Skip to content

Commit

Permalink
[Admin] Add auto-publish workflow (#954)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElizabethSamuel-MSFT authored Dec 13, 2024
1 parent 466a1f9 commit fb7577e
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: auto-publish
run-name: Automatically publish snippets
on:
schedule:
- cron: '00 23 * * FRI'
- cron: '15 10 * * TUE'
- cron: '15 10 * * THU'
jobs:
auto-publish:
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
shell: bash
working-directory: ./
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check out main
run: |
echo "Checking out main branch"
git config user.name github-actions
git config user.email [email protected]
git checkout main
- name: Check out prod
run: |
echo "Checking out prod branch"
git checkout prod
- name: Merge from main into prod
run: |
echo "Merging from main to prod"
git merge main
- name: Push changes
run: |
echo "Pushing changes to prod branch"
git push origin prod

0 comments on commit fb7577e

Please sign in to comment.