Skip to content

Commit b2b5243

Browse files
committed
Update deploy.yml
1 parent ed1647e commit b2b5243

File tree

1 file changed

+58
-46
lines changed

1 file changed

+58
-46
lines changed

.github/workflows/deploy.yml

Lines changed: 58 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,58 @@
1-
name: Deploy
2-
3-
on:
4-
5-
push:
6-
branches:
7-
- master
8-
- dev
9-
10-
jobs:
11-
deploy:
12-
runs-on: ubuntu-latest
13-
14-
env:
15-
CI_JOB_NUMBER: 1
16-
17-
steps:
18-
- uses: actions/checkout@v3
19-
20-
- name: Install Node.js
21-
uses: actions/setup-node@v3
22-
with:
23-
node-version: '20.x'
24-
25-
- name: Install dependencies
26-
run: npm ci
27-
28-
- name: Build lib
29-
run: npm run lib:build
30-
31-
- name: Build app
32-
run: npm run build
33-
34-
- run: sudo apt-get install rsync
35-
36-
- name: Deploy app
37-
uses: Pendect/action-rsyncer@v1.1.0
38-
env:
39-
DEPLOY_KEY: ${{secrets.SERVER_SSH_KEY}}
40-
with:
41-
flags: '-avc --delete'
42-
src: 'dist/app/'
43-
dest: '${{secrets.REMOTE_USER}}@"${{secrets.REMOTE_HOST}}":${{secrets.REMOTE_TARGET}}'
44-
45-
- name: Display status from deploy
46-
run: echo "${{ steps.deploy.outputs.status }}"
1+
name: Deploy
2+
3+
on:
4+
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
CI_JOB_NUMBER: 1
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '22.x'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build lib
28+
run: npm run lib:build
29+
30+
- name: Build app
31+
run: npm run build
32+
33+
- name: Deploy app
34+
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
35+
with:
36+
server: ${{ secrets.SERVER }}
37+
post: ${{ secrets.PORT }}
38+
username: ${{ secrets.USERNAME }}
39+
password: ${{ secrets.PASSWORD }}
40+
local-dir: './dist/app/browser/'
41+
server-dir: ${{ secrets.SERVER_DIR }}
42+
43+
44+
45+
46+
- run: sudo apt-get install rsync
47+
48+
- name: Deploy app
49+
uses: Pendect/action-rsyncer@v1.1.0
50+
env:
51+
DEPLOY_KEY: ${{secrets.SERVER_SSH_KEY}}
52+
with:
53+
flags: '-avc --delete'
54+
src: 'dist/app/'
55+
dest: '${{secrets.REMOTE_USER}}@"${{secrets.REMOTE_HOST}}":${{secrets.REMOTE_TARGET}}'
56+
57+
- name: Display status from deploy
58+
run: echo "${{ steps.deploy.outputs.status }}"

0 commit comments

Comments
 (0)