-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.26 KB
/
test_publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# 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
# 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
# Reload supervisor
supervisorctl restart test_flask_app