File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Toolforge Deploy
2+ on :
3+ push :
4+ branches : [ "master" ]
5+
6+ jobs :
7+ deploy :
8+ name : Deploy to Toolforge
9+ runs-on : ubuntu-latest
10+
11+ strategy :
12+ max-parallel : 4
13+ matrix :
14+ tool : ["editgroups", "editgroups-commons"]
15+
16+ steps :
17+ - name : Configure SSH key
18+ uses : shimataro/ssh-key-action@v2
19+ with :
20+ key : ${{ secrets.SSH_PRIVATE_KEY }}
21+ known_hosts : ${{ secrets.SSH_KNOWN_HOSTS }}
22+
23+ - name : Run deployment commands
24+ 25+ with :
26+ host : ${{ secrets.SSH_HOST }}
27+ username : ${{ secrets.SSH_USER }}
28+ key : ${{ secrets.SSH_PRIVATE_KEY }}
29+ port : ${{ secrets.PORT }}
30+ request_pty : true
31+ script : |
32+ set -xe
33+ become ${{ matrix.tool }} git -C '$HOME/www/python' pull
34+ become ${{ matrix.tool }} webservice python3.11 shell -- webservice-python-bootstrap
35+ become ${{ matrix.tool }} webservice python3.11 shell -- '$HOME/www/python/venv/bin/python' '$HOME/www/python/src/manage.py' migrate
36+ become ${{ matrix.tool }} webservice python3.11 shell -- '$HOME/www/python/venv/bin/python' '$HOME/www/python/src/manage.py' collectstatic --noinput
37+ become ${{ matrix.tool }} webservice python3.11 restart
38+ become ${{ matrix.tool }} webservice python3.11 status
39+ become ${{ matrix.tool }} ./www/python/src/restart_listener.sh
40+ become ${{ matrix.tool }} ./www/python/src/restart_celery.sh
You can’t perform that action at this time.
0 commit comments