Merge pull request #319 from NeurodataWithoutBorders/update_showcase_… #120
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: Keep gh-pages up-to-date with main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository | |
- name: Update gh-pages branch to current main | |
run: | | |
git remote set-url origin https://${{ secrets.USERNAME_GITHUB }}:${{ secrets.API_TOKEN_GITHUB }}@github.com/neurodatawithoutborders/nwb_hackathons.git | |
git push origin -d gh-pages | |
git checkout -b gh-pages | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.API_TOKEN_GITHUB }} | |
branch: gh-pages | |
force: true |