-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (37 loc) · 1.17 KB
/
main.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
# .github/workflows/main.yml
name: Main Volunteers-for-city-projects frontend workflow
on:
push:
branches:
- develop
jobs:
call_tests:
name: Tests
uses: volunteers-for-city-projects/volunteers-frontend/.github/workflows/ci.yml@develop
secrets: inherit
call_build:
name: Build and Push in Docker Hub
needs:
- call_tests
uses: volunteers-for-city-projects/volunteers-frontend/.github/workflows/build.yml@develop
secrets: inherit
deploy:
runs-on: ubuntu-latest
needs:
- call_build
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Executing remote ssh commands to deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
cd better-together
sudo docker compose -f docker-compose.production.yml pull
sudo docker compose -f docker-compose.production.yml down
sudo docker compose -f docker-compose.production.yml up -d
sudo docker system prune -f