Files
matrix-authentication-service/.github/workflows/docs.yaml
T
dependabot[bot] 84749e4dae build(deps): bump actions/deploy-pages from 2.0.0 to 2.0.1
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: actions/deploy-pages
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-18 22:21:06 +02:00

88 lines
2.1 KiB
YAML

name: Build and deploy the documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
jobs:
build:
name: Build the documentation
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Install Rust toolchain
run: |
rustup toolchain install stable
rustup default stable
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1.2.0
with:
mdbook-version: '0.4.25'
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install Node dependencies
working-directory: ./frontend
run: npm ci
- name: Build the documentation
run: mdbook build
- name: Build rustdoc
env:
# This is required to be able use to use the unstable `-Zrustdoc-map` flag
RUSTC_BOOTSTRAP: "1"
run: cargo doc -Zrustdoc-map --workspace --lib --no-deps
- name: Build storybook
working-directory: ./frontend
run: npx storybook build -o ../target/book/storybook
- name: Move the Rust documentation within the mdBook
run: mv target/doc target/book/rustdoc
- name: Upload GitHub Pages artifacts
uses: actions/upload-pages-artifact@v1.0.8
with:
path: target/book/
deploy:
name: Deploy the documentation on GitHub Pages
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2.0.1