Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/deploy-vps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy to VPS (eclipse-forge.ru)

on:
push:
branches: [main, master]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: deploy-vps
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: |
if [ -f package-lock.json ]; then npm ci; else npm install; fi
- name: Build
run: npm run build
- name: Setup SSH
run: |
mkdir -p ~/.ssh
printf '%s\n' "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_deploy
chmod 600 ~/.ssh/id_deploy
- name: Deploy dist via rsync
run: |
rsync -avz --delete -e "ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no" dist/ "${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }}:${{ secrets.VPS_PATH }}/"
Loading