Skip to content

Instantly share code, notes, and snippets.

@iamparthaonline
Created February 28, 2025 11:35
Show Gist options
  • Select an option

  • Save iamparthaonline/f6a99ed45ea3fb54ad514b0560a9c6b2 to your computer and use it in GitHub Desktop.

Select an option

Save iamparthaonline/f6a99ed45ea3fb54ad514b0560a9c6b2 to your computer and use it in GitHub Desktop.
name: CI for Node Apps
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- run: npm run build
- name: rsync deployments
uses: burnett01/[email protected]
with:
switches: -avzr --delete
path: ./
remote_path: '${{ secrets.SSH_REMOTE_PATH }}'
remote_host: '${{ secrets.SSH_REMOTE_HOST }}'
remote_user: '${{ secrets.SSH_REMOTE_USER }}'
remote_key: '${{ secrets.SSH_SECRET_KEY }}'
remote_key_pass: '${{ secrets.SSH_SECRET_KEY_PASS }}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment