2022-02-10 16:18:36 +00:00
|
|
|
name: github pages
|
|
|
|
|
|
|
|
on:
|
2023-09-15 16:47:37 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
# push:
|
|
|
|
# paths:
|
|
|
|
# - docs/**
|
|
|
|
# - .github/workflows/docs.yml
|
|
|
|
# branches:
|
|
|
|
# - master
|
2022-02-10 16:18:36 +00:00
|
|
|
|
2023-07-19 19:50:28 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-02-10 16:18:36 +00:00
|
|
|
jobs:
|
|
|
|
build-deploy:
|
|
|
|
runs-on: ubuntu-latest
|
2022-02-10 17:29:00 +00:00
|
|
|
environment: docs
|
2022-02-10 16:18:36 +00:00
|
|
|
steps:
|
|
|
|
|
2022-08-04 15:26:04 +00:00
|
|
|
# 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 16:18:36 +00:00
|
|
|
- name: Setup mdBook
|
2022-08-04 15:26:04 +00:00
|
|
|
run: |
|
2023-01-06 23:00:12 +00:00
|
|
|
cargo install mdbook --git https://github.com/Demonthos/mdBook.git --branch master
|
2023-09-11 13:32:40 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-02-10 16:18:36 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cd docs &&
|
2022-02-10 17:33:33 +00:00
|
|
|
cd guide && mdbook build -d ../nightly/guide && cd .. &&
|
2023-02-16 23:20:18 +00: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 16:18:36 +00:00
|
|
|
|
|
|
|
- name: Deploy 🚀
|
2023-12-04 13:07:35 +00:00
|
|
|
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
2022-02-10 16:18:36 +00: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 17:29:00 +00:00
|
|
|
token: ${{ secrets.DEPLOY_KEY }} # let's pretend I don't need it for now
|