-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.28 KB
/
deploy-status.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
name: Deployment
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment: ssh
steps:
- name: "Checkout Repo"
uses: actions/checkout@master
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: status-board/package-lock.json
- name: Install dependencies
run: cd status-board && npm install
- name: build
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: |
cd status-board && npm run build
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
# this should match the `pages` option in your adapter-static options
path: 'status-board/build/'
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
SOURCE: ./status-board/build/
REMOTE_HOST: ${{ secrets.DEPLOY_HOST }}
REMOTE_USER: ${{ secrets.DEPLOY_USER }}
TARGET: /srv/food_calc_status_api/status-board/build/
SCRIPT_AFTER: echo $RSYNC_STDOUT
REMOTE_PORT: ${{ secrets.DEPLOY_PORT }}