Skip to content

docs: sync example tutorials from cosmos/docs (#8) #9

docs: sync example tutorials from cosmos/docs (#8)

docs: sync example tutorials from cosmos/docs (#8) #9

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