From fb2e77a68ac3b90948fc36565769e192389b3fa1 Mon Sep 17 00:00:00 2001 From: Miles Murgaw Date: Thu, 8 Feb 2024 16:31:46 -0500 Subject: [PATCH] feat: prerelease docs --- .github/workflows/docs.yml | 70 +++++++++++++++----------------------- 1 file changed, 28 insertions(+), 42 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7701209c1..63893847b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,49 +1,35 @@ -name: github pages - +name: Deploy Nightly Docs on: - workflow_dispatch: - # push: - # paths: - # - docs/** - # - .github/workflows/docs.yml - # branches: - # - master - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + push: + branches: + - master + - main jobs: - build-deploy: - runs-on: ubuntu-latest - environment: docs - steps: + deploy: Deploy + runs-on: ubuntu-latest + permissions: + contents: write - # 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" + steps: + - name: Clone Repo + uses: actions/checkout@v4 - # NOTE: Delete when the previous one is enabled - - name: Setup mdBook - run: | - cargo install mdbook --git https://github.com/Demonthos/mdBook.git --branch master - - uses: actions/checkout@v4 + - name: Set up cargo cache + uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0-docs" - - name: Build - run: cd docs && - cd guide && mdbook build -d ../nightly/guide && cd .. && - cd router && mdbook build -d ../nightly/router && cd .. - # cd reference && mdbook build -d ../nightly/reference && cd .. && - # cd fermi && mdbook build -d ../nightly/fermi && cd .. + - name: cargo doc + run: cargo doc --no-deps --workspace - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.5.0 - 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 - token: ${{ secrets.DEPLOY_KEY }} # let's pretend I don't need it for now + - name: upload artifacts + uses: actions/upload-pages-artifact@v3 + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + branch: gh-pages-docs + folder: target/doc + #target-folder: docs + #repository-name: \ No newline at end of file