Make deployment action run itself if it changes #3
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: Deploy to production | |
on: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- '.github/workflows/deploy.yml' | |
- 'version/**' | |
workflow_dispatch: | |
concurrency: | |
group: deploy | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
name: Deploy to mirror | |
runs-on: self-hosted | |
environment: technic-mirror | |
steps: | |
- name: Pull changes | |
run: cd $MIRROR_BASEPATH && sudo -u $MIRROR_USER2 -H git pull | |
env: | |
MIRROR_BASEPATH: ${{ secrets.MIRROR_BASEPATH }} | |
MIRROR_USER2: ${{ secrets.MIRROR_USER2 }} |