Update README.md #186
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: deploy-book | |
| on: | |
| push | |
| # This job installs dependencies, builds the book, and pushes it to `gh-pages` | |
| jobs: | |
| deploy-book: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Build the book | |
| - name: Build the book | |
| shell: bash | |
| run: | | |
| make build | |
| - name: Branch | |
| shell: bash | |
| id: target | |
| run: | | |
| echo "Branch: ${{ github.ref }}" | |
| if ${{ github.ref == 'refs/heads/main' }}; then | |
| echo "branch=gh-pages" >> $GITHUB_OUTPUT | |
| else | |
| echo "branch=draft" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Publish book | |
| uses: JamesIves/github-pages-deploy-action@v4.7.2 | |
| with: | |
| branch: ${{ steps.target.outputs.branch }} # The branch the action should deploy to. | |
| folder: book/_build/html # The folder the action should deploy. |