Update tokens guide for clarity and consistency #6
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: Publish docs | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main, release ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build mdbook | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup build | |
| uses: ./.github/actions/setup-build | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install dependencies | |
| working-directory: docs/breez-sdk | |
| run: | | |
| cargo install mdbook --vers "^0.4" --locked | |
| cargo install --path ./snippets-processor | |
| cargo install mdbook-variables --vers "^0.2" --locked | |
| - name: Get latest tag | |
| uses: actions-ecosystem/action-get-latest-tag@v1 | |
| id: get-latest-tag | |
| - name: Set latest tag in book | |
| working-directory: docs/breez-sdk/src/guide | |
| run: | | |
| sed -i.bak "s/{VERSION}/${{ steps.get-latest-tag.outputs.tag }}/" install.md | |
| rm -f install.md.bak | |
| - name: Build mdbook | |
| working-directory: docs/breez-sdk | |
| run: mdbook build | |
| - name: Archive book | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: breez-sdk-book | |
| path: docs/breez-sdk/book | |
| - name: Push book to main-docs-generated branch | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| run: | | |
| sudo chmod -R ugo+rwX .git # See https://github.com/actions/checkout/issues/164 | |
| git config --global user.name "Generator" | |
| git config --global user.email "no-reply@breez.technology" | |
| git add -f docs/breez-sdk/book | |
| git commit -m "Generate documentation" | |
| git push origin --force main:main-docs-generated | |
| - name: Push book to release-docs-generated branch | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/release' }} | |
| run: | | |
| sudo chmod -R ugo+rwX .git # See https://github.com/actions/checkout/issues/164 | |
| git config --global user.name "Generator" | |
| git config --global user.email "no-reply@breez.technology" | |
| git add -f docs/breez-sdk/book | |
| git commit -m "Generate documentation" | |
| git push origin --force release:release-docs-generated |