forked from ntyunyayev/assembler-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1.04 KB
/
Copy pathmain.yml
File metadata and controls
37 lines (36 loc) · 1.04 KB
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
name: Deploy via SSH
on:
push:
branches:
- master
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
proxy_host: ${{ secrets.SSH_HOST_PROXY }}
proxy_username: ${{ secrets.SSH_USERNAME_PROXY }}
proxy_key: ${{ secrets.SSH_KEY_PROXY }}
script: |
cd /shared_data/assembler-simulator
# Fetch all remote changes
git fetch --all
# Force the local branch to match the remote master exactly
git reset --hard origin/master
# Clean up any untracked files
git clean -fd
# Build cpu-core first
cd cpu-core
pnpm install
pnpm build
# Then build frontend
cd ../frontend
pnpm install
pnpm build
# Static files in frontend/dist are served directly by NGINX