Merge pull request #5 from storytold/echelon-sync-staging

Attempt to make a syncing github action
This commit is contained in:
Brandon Thomas authored and GitHub committed 2022-06-18 19:43:38 -04:00
commit 94c3ff51b6
1 file changed
+26
+26
View File
@@ -0,0 +1,26 @@
# Adapted from:
# https://github.community/t/user-github-pages-site-auto-deploy-from-another-branch-on-push/17912/2
on:
push:
branches:
- master
jobs:
job1:
runs-on: [ubuntu-latest]
steps:
- name: checkout master branch # checkout master branch
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Sync master to staging
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git fetch master staging:staging
git commit -m "Syncing staging with master"
- name: Push changes #push files into master branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true