24 lines
657 B
YAML
24 lines
657 B
YAML
name: Build and Deploy
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- name: Deploy to Synology
|
|
run: |
|
|
apt-get update && apt-get install -y rsync openssh-client
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
ssh-keyscan -p 22 10.0.0.19 >> ~/.ssh/known_hosts
|
|
ssh -vvv -i ~/.ssh/id_ed25519 wapj2000@10.0.0.19 "echo ok" 2>&1 | tail -20
|