dioxus/.github/workflows/docs.yml

45 lines
1.4 KiB
YAML
Raw Normal View History

2022-02-10 11:18:36 -05:00
name: github pages
on:
push:
paths:
2022-02-10 12:21:07 -05:00
- docs/**
2022-02-10 12:29:00 -05:00
- .github/workflows/docs.yml
2022-02-11 22:49:48 +01:00
branches:
- master
2022-02-10 11:18:36 -05:00
jobs:
build-deploy:
runs-on: ubuntu-latest
2022-02-10 12:29:00 -05:00
environment: docs
2022-02-10 11:18:36 -05:00
steps:
# NOTE: Comment out when https://github.com/rust-lang/mdBook/pull/1306 is merged and released
# - name: Setup mdBook
# uses: peaceiris/actions-mdbook@v1
# with:
# mdbook-version: "0.4.10"
# NOTE: Delete when the previous one is enabled
2022-02-10 11:18:36 -05:00
- name: Setup mdBook
run: |
cargo install mdbook --git https://github.com/Demonthos/mdBook.git --branch master
2022-12-13 15:34:35 -08:00
- uses: actions/checkout@v3
2022-02-10 11:18:36 -05:00
- name: Build
run: cd docs &&
2022-02-10 12:33:33 -05:00
cd guide && mdbook build -d ../nightly/guide && cd .. &&
2023-02-16 15:20:18 -08:00
cd router && mdbook build -d ../nightly/router && cd ..
# cd reference && mdbook build -d ../nightly/reference && cd .. &&
# cd fermi && mdbook build -d ../nightly/fermi && cd ..
2022-02-10 11:18:36 -05:00
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.1
2022-02-10 11:18:36 -05:00
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/nightly # The folder the action should deploy.
target-folder: docs/nightly
repository-name: dioxuslabs/docsite
clean: false
2022-02-10 12:29:00 -05:00
token: ${{ secrets.DEPLOY_KEY }} # let's pretend I don't need it for now