-
Notifications
You must be signed in to change notification settings - Fork 24
39 lines (37 loc) · 1.18 KB
/
frontend-cd.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
name: Frontend Continuous Deployment
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Docker login
env:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
run: docker login https://ghcr.io -u ${username} -p ${password}
- name: Build image
run: docker build . -t ghcr.io/memelabs/rustla2/rustla2-ui:latest
- name: Publish image
run: docker push ghcr.io/memelabs/rustla2/rustla2-ui:latest
- name: ssh-deploy for rustla ui
uses: appleboy/ssh-action@122f35dca5c7a216463c504741deb0de5b301953
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
./hooks/rustla2-ui.sh
- name: Purge cache
run: |
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_RUSTLA2_ZONE }}/purge_cache" \
-H "Authorization: Bearer ${{ secrets.CF_TOKEN }}" \
-H "Content-Type:application/json" \
--data '{"purge_everything": true}'