Commit d8cfb4e 1 parent ec767a5 commit d8cfb4e Copy full SHA for d8cfb4e
File tree 2 files changed +30
-42
lines changed
2 files changed +30
-42
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows : ["Create and publish a Docker image"]
6
+ branches : [main]
7
+ types :
8
+ - completed
9
+
10
+ jobs :
11
+ deploy :
12
+ runs-on : ubuntu-latest
13
+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
14
+ steps :
15
+ - name : Setup SSH key
16
+ shell : bash
17
+ env :
18
+ SSH_PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY }}
19
+ run : |
20
+ mkdir -p ~/.ssh
21
+ echo "${SSH_PRIVATE_KEY}" | base64 -d > ${HOME}/.ssh/deploy.id_rsa
22
+ chmod 700 ${HOME}/.ssh/deploy.id_rsa
23
+ - name : Update Docker container
24
+ shell : bash
25
+ run : |
26
+ ssh -i ${HOME}/.ssh/deploy.id_rsa -o StrictHostKeyChecking=no [email protected] << EOF
27
+ docker pull ghcr.io/munichmakerlab/website:main
28
+ systemctl restart docker-website.service
29
+ systemctl status docker-website.service
30
+ EOF
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments