From 300a864e51d485f4f77b2fa3b37670f8034f74d7 Mon Sep 17 00:00:00 2001 From: JoostBuitink <44062204+JoostBuitink@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:30:37 +0100 Subject: [PATCH] update github actions --- .github/workflows/Documenter.yml | 18 ------------------ .github/workflows/docs.yml | 26 +++++++++++++++++++------- 2 files changed, 19 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/Documenter.yml diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml deleted file mode 100644 index b91b123b5..000000000 --- a/.github/workflows/Documenter.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Documenter -on: - push: - branches: [master] - tags: [v*] - pull_request: - -jobs: - Documenter: - name: Documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: julia-actions/julia-buildpkg@latest - - uses: julia-actions/julia-docdeploy@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 411087ed3..7bf030cbb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,19 +1,21 @@ -name: Docs +name: Quarto documentation on: push: - branches: [v1, v1_quarto_docs] + branches: [master] pull_request: - branches: [v1] + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true + # needed to allow julia-actions/cache to delete old caches that it has created permissions: actions: write contents: read + jobs: publish: - name: Docs Julia + name: Build and publish docs runs-on: ubuntu-latest permissions: contents: write @@ -38,12 +40,22 @@ jobs: - name: Render Quarto Project run: pixi run quarto-render - - name: Publish Quarto Project - # if: github.ref == 'refs/heads/v1' + - name: Publish Quarto Project as preview + if: github.event_name == 'pull_request' + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/_site + destination_dir: previews/PR${{ github.event.number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish Quarto Project as dev + if: github.event_name == 'push' && github.ref == 'refs/heads/master' uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/_site - destination_dir: quarto + destination_dir: dev env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file