-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (51 loc) · 1.36 KB
/
deploy.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
name: "deploy"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
publish-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 20
- run: corepack enable
- name: install Rust nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: install wasm-pack
run:
npm install -g wasm-pack
- name: install app dependencies and build it
run: pnpm i && pnpm run build-web
# Run type check after the wasm package is built
- name: run tsc
run: pnpm tsc --noEmit
- name: upload files
uses: actions/upload-artifact@v3
with:
name: bestcraft-dist
path: dist/
deploy-web:
needs: publish-web
runs-on: ubuntu-latest
environment: SSH Deployer
steps:
- name: download files
uses: actions/download-artifact@v3
with:
name: bestcraft-dist
- name: ssh deploy
uses: easingthemes/[email protected]
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlzvc --exclude=releases --exclude=.htaccess --exclude=.user.ini --delete --delete-after -i"
SOURCE: "./"
REMOTE_HOST: ${{ vars.REMOTE_HOST }}
REMOTE_USER: ${{ vars.REMOTE_USER }}
TARGET: ${{ vars.TARGET }}