excursions/.forgejo/workflows/deploy.yaml
lootboxer 7441aa5d58
Some checks are pending
CI/CD Pipeline / build (push) Waiting to run
CI/CD Pipeline / deploy (push) Blocked by required conditions
deploy.yaml
2025-07-01 03:55:37 +03:00

50 lines
1.1 KiB
YAML

name: CI/CD Pipeline
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
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: actions/upload-artifact@v4
with:
name: build-dist
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/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 }}