-
Notifications
You must be signed in to change notification settings - Fork 3
32 lines (30 loc) · 1.22 KB
/
deploy.yaml
File metadata and controls
32 lines (30 loc) · 1.22 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
name: deploy
on:
workflow_dispatch:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install NPM dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Run unit and integration tests
run: npm test
- name: Build application
run: npm run build
- name: Deploy with rsync
run: rsync -avz --no-perms --omit-dir-times --delete ./out/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.HOST_DEPLOY_PATH }} --exclude downloads --exclude keep --exclude ExE1Dlex4PyE78q9BXFv --exclude ExE1Dlex4PyE78q9BXkl --exclude sparcity --exclude toadstool2.0