aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/doc.yml
blob: d588468cd2957fee62af7f362d5fe5157fbc8a0f (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
name: Pages

on:
  push:
    branches:
      - master
  workflow_dispatch:

permissions:
  contents: write

jobs:
  pages:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4
      - name: Build documentation
        run: cargo doc --verbose --no-deps
      - name: Write CNAME file
        run: echo 'iced-dialog.pml68.dev' > ./target/doc/CNAME
      - name: Copy redirect file as index.html
        run: cp docs/redirect.html target/doc/index.html
      - name: Deploy documentation
        if: github.ref == 'refs/heads/master'
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./target/doc
          force_orphan: true