Skip to content

feat: standardised cd pipeline (#136) #2

feat: standardised cd pipeline (#136)

feat: standardised cd pipeline (#136) #2

Workflow file for this run

name: Sync Important Items Except Those Needed For Deployment
on:
push:
branches:
- "master"
paths:
- "scripts/**"
- ".github/workflows/sync.yaml"
jobs:
push:
name: Push Stage
runs-on: ubuntu-latest
steps:
- name: Sync local repo with remote repo
uses: appleboy/ssh-action@master
env:
PROJECT_DIR: ${{ secrets.PROJECT_DIR }}
with:
host: ${{ secrets.SSH_HOSTNAME }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
passphrase: ${{ secrets.SSH_PRIVATE_KEY_PASSPHRASE }}
envs: PROJECT_DIR
script_stop: true
script: |
cd "${PROJECT_DIR}/"
sudo git fetch origin
sudo git reset --hard origin/master