Skip to content

Fix branch checked out in test site publish #6

Fix branch checked out in test site publish

Fix branch checked out in test site publish #6

Workflow file for this run

# SPDX-FileCopyrightText: 2024 Alec Delaney
# SPDX-License-Identifier: MIT
name: Publish Test Site
on:
pull_request:
branches: ['main']
workflow_dispatch:
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 /home/test-tekktrik-dev
# Update the repository
git fetch
git checkout ${{ github.head_ref }}
git config pull.rebase true
git pull --rebase -ff
# Update the environment
rm -rf .venv
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
deactivate
# Reload supervisor
sudo supervisorctl start test_flask_app