-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (31 loc) · 906 Bytes
/
CI.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
name: CI
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'npm'
- name: Install dependencies
run: npm i
- name: Build scripts
run: npm run build
- name: Move scripts
run: mv ../scripts .
- name: Deploy
uses: appleboy/scp-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
port: 22
key: ${{ secrets.DEPLOY_SSHKEY }}
source: "web/css/,web/img/,web/index.html,web/js/,web/node_modules/,web/package-lock.json,web/package.json,web/php/,web/scripts"
target: ${{ secrets.DEPLOY_TARGET }}
strip_components: 1