Add new job #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 Alec Delaney | |
# SPDX-License-Identifier: MIT | |
name: Unpublish Test Site | |
on: | |
pull_request: | |
types: [closed] | |
branches: ['main'] | |
workflow_dispatch: | |
jobs: | |
unpublish-test-website: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Stop 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 main | |
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 | |
# Print version of cronberry being used | |
PATH="/home/$(whoami)/.local/bin:$PATH" | |
cronberry --version | |
# Update image cache instruction | |
sh scripts/schedule_cache.sh | |
# Stop supervisor | |
supervisorctl stop test_flask_app |