excursions/.forgejo/workflows/deploy.yaml
lootboxer afff7dd571
Some checks are pending
/ deploy (push) Waiting to run
/ build (push) Successful in 1m23s
deploy.yaml
2025-07-01 04:05:04 +03:00

48 lines
1.1 KiB
YAML

on:
push:
branches:
- main
jobs:
build:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node 20
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install Node.js dependencies
run: npm install
- name: Build
run: npm run build
- name: Upload build artifact
uses: 'christopherhx/gitea-upload-artifact@v4'
with:
name: build-dist
retention-days: 1
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: 'christopherhx/gitea-download-artifact@v4'
with:
name: build-dist
path: dist
- name: Deploy to Server
uses: wlixcc/SFTP-Deploy-Action@v1.2.6
with:
username: ${{ secrets.FTP_USERNAME }}
server: ${{ secrets.FTP_HOST }}
ssh_private_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
local_path: 'dist/*'
remote_path: ${{ secrets.FTP_PATH }}