fix: trigger workflow on workflow change as well #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Important Items Except Those Needed For Deployment | |
on: | |
push: | |
branches: | |
- "master" | |
paths: | |
- ".github/workflows/sync.yaml" | |
- "scripts/**" | |
jobs: | |
pull: | |
name: Pull Stage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Sync with remote repository | |
uses: appleboy/ssh-action@master | |
env: | |
WIKI_DIR: ${{ secrets.WIKI_DIR }} | |
with: | |
host: ${{ secrets.HOSTNAME }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
envs: WIKI_DIR | |
script_stop: true | |
script: | | |
cd "${WIKI_DIR}/" | |
sudo git fetch origin | |
sudo git reset --hard origin/master |