diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 888d6a7774..14266bb8aa 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -1,84 +1,70 @@ -# # Documentation and mdbook related jobs. +# Documentation and mdbook related jobs. -# name: book +name: book -# on: -# push: -# branches: [main] -# pull_request: -# branches: [main] -# types: [opened, reopened, synchronize, closed] -# merge_group: +on: + push: + branches: [main] + pull_request: + branches: [main] + types: [opened, reopened, synchronize, closed] + merge_group: -# # jobs: -# # build: -# # runs-on: ubuntu-latest -# # timeout-minutes: 60 -# # steps: -# # - name: Checkout -# # uses: actions/checkout@v4 +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v4 -# # - name: Install bun -# # uses: oven-sh/setup-bun@v2 + - name: Install bun + uses: oven-sh/setup-bun@v2 -# # - name: Install Playwright browsers -# # # Required for rehype-mermaid to render Mermaid diagrams during build -# # run: | -# # cd docs/vocs/ -# # bun i -# # npx playwright install --with-deps chromium + - name: Install Playwright browsers + # Required for rehype-mermaid to render Mermaid diagrams during build + run: | + cd docs/vocs/ + bun i + npx playwright install --with-deps chromium -# # - name: Install Rust nightly -# # uses: dtolnay/rust-toolchain@nightly + - name: Install Rust nightly + uses: dtolnay/rust-toolchain@nightly -# # - name: Build docs -# # run: cd docs/vocs && bash scripts/build-cargo-docs.sh + - name: Build docs + run: cd docs/vocs && bash scripts/build-cargo-docs.sh -# # - name: Build Vocs -# # run: | -# # cd docs/vocs/ && bun run build -# # echo "Vocs Build Complete" + - name: Build Vocs + run: | + cd docs/vocs/ && bun run build + echo "Vocs Build Complete" -# # - name: Setup Pages -# # uses: actions/configure-pages@v5 + - name: Setup Pages + uses: actions/configure-pages@v5 -# # - name: Upload artifact -# # uses: actions/upload-pages-artifact@v3 -# # with: -# # path: "./docs/vocs/docs/dist" -# jobs: -# build: -# if: false -# runs-on: ubuntu-latest -# steps: -# - name: Disabled -# run: echo "Build job disabled" + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: "./docs/vocs/docs/dist" -# deploy: -# if: false -# runs-on: ubuntu-latest -# steps: -# - name: Disabled -# run: echo "Deploy job disabled" + deploy: + # Only deploy if a push to main + if: github.ref_name == 'main' && github.event_name == 'push' + runs-on: ubuntu-latest + needs: [build] -# # deploy: -# # # Only deploy if a push to main -# # if: github.ref_name == 'main' && github.event_name == 'push' -# # runs-on: ubuntu-latest -# # needs: [build] + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write + id-token: write -# # Grant GITHUB_TOKEN the permissions required to make a Pages deployment -# permissions: -# pages: write -# id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} -# environment: -# name: github-pages -# url: ${{ steps.deployment.outputs.page_url }} + timeout-minutes: 60 -# timeout-minutes: 60 - -# # steps: -# # - name: Deploy to GitHub Pages -# # id: deployment -# # uses: actions/deploy-pages@v4 + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file