Skip to content

Commit d1ab5a5

Browse files
committed
wip
1 parent 3e53793 commit d1ab5a5

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: npm
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Build
27+
run: npm run build
28+
29+
- name: Setup SSH
30+
run: |
31+
mkdir -p ~/.ssh
32+
printf '%s\n' "${{ secrets.FORGE_SSH_KEY }}" > ~/.ssh/deploy_key
33+
chmod 600 ~/.ssh/deploy_key
34+
ssh-keyscan -H "${{ secrets.FORGE_HOST }}" >> ~/.ssh/known_hosts
35+
36+
- name: Deploy build folder
37+
run: |
38+
rsync -az --delete \
39+
-e "ssh -i ~/.ssh/deploy_key" \
40+
build/ \
41+
"${{ secrets.FORGE_USER }}@${{ secrets.FORGE_HOST }}:${{ secrets.FORGE_DEPLOY_PATH }}/"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
24+
25+
rootpi_deploy*

0 commit comments

Comments
 (0)