summaryrefslogtreecommitdiff
path: root/.github/workflows/docs.yml
blob: 50102b83ec50ae7cdda0e23e214f0c9d67e04016 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Upload documentation to GitHub Pages

on:
  push:
    branches:
      - master

# Sets permissions of `GITHUB_TOKEN` to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup Rust toolchain
        run: TARGET=x86_64-unknown-linux-gnu sh ./ci/install-rust.sh
      - name: Generate documentation
        run: LIBC_CI=1 sh ci/dox.sh
      - name: Setup Pages
        uses: actions/configure-pages@v2
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: 'target/doc'
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1