-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (27 loc) · 1.09 KB
/
deploy-web.yaml
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
name: Deploy Web
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- run: docker build -t gatherloop/gatherloop-pos-web -f apps/web/Dockerfile --build-arg API_BASE_URL=${{ secrets.API_BASE_URL }} .
- run: docker push gatherloop/gatherloop-pos-web
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
script: |
docker container stop gatherloop-pos-web
docker container remove gatherloop-pos-web
docker rmi $(docker images --format '{{.Repository}}:{{.Tag}}' | grep 'gatherloop/gatherloop-pos-web')
docker pull gatherloop/gatherloop-pos-web
docker run --name gatherloop-pos-web -p 3000:3000 -d gatherloop/gatherloop-pos-web