From f7d57512594492e3e0e5ef60b3ca34d0a2ac8261 Mon Sep 17 00:00:00 2001 From: Nico Wagner Date: Thu, 12 Dec 2024 19:12:33 +0100 Subject: [PATCH] docs(book): Add `publish` job (#890) Signed-off-by: Nico Wagner --- .github/workflows/rust.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a596d2ce9..890e8a0be 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -147,8 +147,12 @@ jobs: command: check ${{ matrix.checks }} rust-version: stable - ci: + publish: + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest + permissions: + contents: write + pages: write needs: - clippy - deny @@ -159,5 +163,22 @@ jobs: - rustfmt - test - udeps + steps: + - uses: actions/checkout@v4 + - uses: quarto-dev/quarto-actions/setup@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tinytex: true + - uses: quarto-dev/quarto-actions/publish@v2 + with: + target: gh-pages + path: docs/book + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + ci: + runs-on: ubuntu-latest + needs: publish steps: - run: exit 0