-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (51 loc) · 1.77 KB
/
node.js.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
55
56
57
58
name: Rollup
on:
push:
branches: ['test']
jobs:
build_and_deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run build --if-present
- name: copy file via ssh password
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: './dist/'
target: '/home/aukus/deploy/frontend/test/deploy_build'
- name: swap build and restart nginx
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
command_timeout: 1m
script: cd "/home/aukus/deploy/frontend/test" && rm -rf build && mkdir build && mv deploy_build/dist/* ./build/ && rm -r deploy_build/dist
- name: Aukus test frontend build and upload success!
uses: rjstone/discord-webhook-notify@v1
if: success()
with:
severity: info
details: Aukus test frontend build and upload success!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
- name: Aukus test frontend build and upload failure!
uses: rjstone/discord-webhook-notify@v1
if: failure()
with:
severity: error
details: Aukus test frontend build and upload failure!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}