docs: sync example tutorials from cosmos/docs (#8) #9
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: Update tutorial/start branch | |
| # Regenerates tutorial/start from main whenever main changes. | |
| # Strips the counter module and force-pushes to tutorial/start. | |
| # Skip if the push was itself a tutorial-sync or docs-sync commit. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| update: | |
| name: Regenerate tutorial/start | |
| runs-on: ubuntu-latest | |
| if: | | |
| !contains(github.event.head_commit.message, '[tutorial-sync]') && | |
| !contains(github.event.head_commit.message, '[docs-sync]') | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Configure git | |
| run: | | |
| git config user.name "tutorial-sync[bot]" | |
| git config user.email "tutorial-sync[bot]@users.noreply.github.com" | |
| - name: Create tutorial/start branch | |
| run: bash scripts/create-tutorial-branch.sh | |
| - name: Force-push tutorial/start | |
| run: git push -f origin tutorial/start |