-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (39 loc) · 1.15 KB
/
deploy-web.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: Deploy website
on:
push:
tags: 'v*'
branches:
- "dev"
jobs:
web-deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: "Setup node"
uses: actions/setup-node@v1
with:
node-version: '18'
- name: Get latest code
uses: actions/checkout@v2
- name: "Install modules"
run: "npm run install:ci"
- name: "Generate build information json"
run: "node generateInfo.js"
- name: "Edit package.json for web deployment"
run: "node editPackageWeb.js"
- name: Build web
run: npm run build:web
- name: "Package JSON"
run: |
echo "INFO_VERSION=$(jq -r .version ./src/info.json)" >> $GITHUB_ENV
echo "INFO_BRANCH=$(jq -r .branch ./src/info.json)" >> $GITHUB_ENV
echo "INFO_TIMESTAMP=$(jq -r .timestamp ./src/info.json)" >> $GITHUB_ENV
- name: Deploy
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.server }}
username: ${{ secrets.username }}
password: ${{ secrets.password }}
local-dir: ./build/
dangerous-clean-slate: true
server-dir: /var/www/mtgatool-app/