Frontend component migration (#774) #69
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: 'Build and Deploy Project Documentation' | |
# This Workflow builds a static site using mdBook and deploys it to GitHub Pages. | |
# The GitHub repo settings must be configured for pages deployed from this workflow to persist after | |
# another push to the repository. Go to Repository Settings > Pages -> Build and Deployment, | |
# set the source to the `GitHub Actions` branch. | |
# For more information on mdbook, see https://rust-lang.github.io/mdBook/ | |
on: | |
push: | |
branches: ['main'] | |
paths: | |
- 'docs/**/*.md' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
env: | |
BOOK_DIRECTORY: ./docs/guide | |
MDBOOK_VERSION: v0.4.37 | |
jobs: | |
build: | |
name: 'Build Documentation' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ env.BOOK_DIRECTORY }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup mdBook | |
run: | | |
mkdir bin | |
curl -sSL https://github.com/rust-lang/mdBook/releases/download/${{env.MDBOOK_VERSION}}/mdbook-${{env.MDBOOK_VERSION}}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin | |
- name: Build Documentation | |
run: bin/mdbook build | |
- name: Upload Docs | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: '${{ env.BOOK_DIRECTORY }}/book' | |
deploy_pages: | |
name: Deploy Documentation | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |