more entries #29
This file contains 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 mdBook site to Pages | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
concurrency: | |
group: "pages-${{ github.ref }}" | |
cancel-in-progress: false | |
jobs: | |
build: | |
name: Build Site | |
runs-on: ubuntu-latest | |
env: | |
MDBOOK_VERSION: v0.4.40 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install mdBook | |
run: curl -L "https://github.com/rust-lang/mdBook/releases/download/$MDBOOK_VERSION/mdbook-$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz" | tar xz | |
- name: Build with mdBook | |
run: ./mdbook build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./book | |
deploy: | |
name: Deploy Site | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |