Skip to content

Update jobs, make easier to update/patch #145

Update jobs, make easier to update/patch

Update jobs, make easier to update/patch #145

Workflow file for this run

# SPDX-FileCopyrightText: 2024 Alec Delaney
# SPDX-License-Identifier: MIT
name: Publish Test Site
on:
pull_request_target:
branches: ['main']
workflow_dispatch:
permissions:
read-all
jobs:
publish-test-website:
runs-on: ubuntu-latest
environment:
name: testing
steps:
- name: Update and deploy on server
uses: appleboy/[email protected]
with:
host: tekktrik.dev
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
# Change to directory
cd /srv/www/test-tekktrik-dev
# Update the repository
git fetch
git checkout ${{ github.head_ref }}
git config pull.rebase true
git pull --rebase -ff
# Create environment file
echo GRAPHQL_TOKEN=${{ secrets.GRAPHQL_TOKEN }} > .env
# Recreate virtual environment
rm -rf .venv
python3.12 -m venv .venv
source .venv/bin/activate
# Download dependencies
python -m pip install -r requirements.txt
# Start docker container
make start-test