Automatically publish snippets #5
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: auto-publish | |
run-name: Automatically publish snippets | |
on: | |
schedule: | |
- 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 | |