Skip to content

Deploy src to Staging #95

Deploy src to Staging

Deploy src to Staging #95

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