Deploy src to Staging #108
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 src to Staging | |
on: | |
workflow_run: | |
workflows: ["DITA Workflow"] | |
types: | |
- completed | |
jobs: | |
deploy-dev-to-stage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Dev Branch | |
uses: actions/checkout@v3 | |
with: | |
ref: dev | |
- name: Copy src Folder to Temporary Location | |
run: cp -r src /tmp/src | |
- name: Checkout Stage Branch | |
run: | | |
git fetch origin | |
git checkout stage | |
git pull origin stage | |
- name: Remove Existing src Folder | |
run: rm -rf src | |
- name: Move src Folder from Temporary Location | |
run: mv /tmp/src ./src | |
- name: Commit Changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add src | |
git commit -m 'Deployed html src folder from dev branch to stage' | |
- name: Push Changes to Stage | |
run: git push origin stage |