aaronjy-me/.github/workflows/deploy.yml
2025-03-09 19:47:08 +00:00

39 lines
No EOL
806 B
YAML

name: Deploy site
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Deploy
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.SFTP_HOST }}
port: 22 # Default SFTP port
username: ${{ secrets.SFTP_USERNAME }}
password: ${{ secrets.SFTP_PASSWORD }}
local-dir: "./out/"
server-dir: "/root/www-aaronjy-me/"