Test gh-pages action #25
Workflow file for this run
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: "mdBook Preview" | |
| on: [push] | |
| # Needed for deploying to GitHub Pages and for posting a PR comment | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| MDBOOK_VERSION: 0.4.51 | |
| if: github.repository_owner == 'clash-lang' # don't run from forks | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install mdBook | |
| run: | | |
| curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh | |
| rustup update | |
| cargo install --version ${MDBOOK_VERSION} mdbook | |
| - name: Build root book with mdBook | |
| run: mdbook build | |
| - name: Build Compiler User Guide with mdBook | |
| run: mdbook build | |
| working-directory: ./compiler-user-guide | |
| - name: Build Tutorial with mdBook | |
| run: mdbook build | |
| working-directory: ./tutorial | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./public # The directory mdbook builds to | |
| publish_branch: gh-pages-test | |
| destination_dir: ./this/is/absurdly/deeply/nested |