-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (47 loc) · 1.47 KB
/
Deploy.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
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Deploy
on:
push:
branches: [ "main" ]
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Removing old deployment
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd ~/prod/2024_BEOTKKOTTHON/Frontend
podman-compose down 2>&1
- name: Getting source and build
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd ~/prod/2024_BEOTKKOTTHON/Frontend
git pull
podman rmi 2024goormthon/frontend 2>&1
podman build -t 2024goormthon/frontend .
- name: Run deployment
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd ~/prod/2024_BEOTKKOTTHON/Frontend
podman-compose up -d