Update toc.yml #17
This file contains hidden or 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: Bump website submodule | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: {} | |
| jobs: | |
| bump: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout website repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: downpatch/website | |
| token: ${{ secrets.WEBSITE_PUSH_TOKEN }} | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Update submodule to latest main | |
| run: | | |
| set -euo pipefail | |
| git submodule update --init --recursive | |
| git -C wwwroot/Content fetch origin main | |
| git -C wwwroot/Content checkout -q main | |
| git submodule update --remote --merge wwwroot/Content | |
| - name: Commit and push if changed | |
| run: | | |
| set -euo pipefail | |
| if git diff --quiet; then | |
| echo "No submodule change" | |
| exit 0 | |
| fi | |
| git config user.name "downpatch-bot" | |
| git config user.email "downpatch-bot@users.noreply.github.com" | |
| git add wwwroot/Content | |
| git commit -m "chore(content): bump submodule" | |
| git push |