From a24911278414004def07255581d6ac9cbb47ba4c Mon Sep 17 00:00:00 2001 From: joelnitta Date: Sun, 24 Nov 2024 13:42:47 +0900 Subject: [PATCH] Update publishing workflow --- .github/workflows/quarto-book-gh-pages.yaml | 42 +++++++-------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/.github/workflows/quarto-book-gh-pages.yaml b/.github/workflows/quarto-book-gh-pages.yaml index 352301d..e054371 100644 --- a/.github/workflows/quarto-book-gh-pages.yaml +++ b/.github/workflows/quarto-book-gh-pages.yaml @@ -1,41 +1,25 @@ on: + workflow_dispatch: push: branches: main - pull_request: - branches: main - # to be able to trigger a manual build - workflow_dispatch: -name: Render and deploy Book +name: Quarto Publish jobs: build-deploy: runs-on: ubuntu-latest + permissions: + contents: write steps: - - uses: actions/checkout@v2 - - - name: Install Quarto - uses: quarto-dev/quarto-actions/install-quarto@v1 - with: - # To install LaTeX to build PDF book - tinytex: true - # uncomment below and fill to pin a version - # version: 0.9.105 - - # Install any computing dependency you may need, usually either python and Jupyter or R - # More specific examples will be shared on quarto-dev/quarto-actions project + - name: Check out repository + uses: actions/checkout@v4 - - name: Render book to all format - # Add any command line argument needed - run: | - quarto render + - name: Set up Quarto + uses: quarto-dev/quarto-actions/setup@v2 - - name: Deploy 🚀 - # only deploy when push to main - if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4 + - name: Render and Publish + uses: quarto-dev/quarto-actions/publish@v2 with: - # The branch the action should deploy to. - branch: gh-pages - # The folder the action should deploy. Adapt if you changed in Quarto config - folder: docs \ No newline at end of file + target: gh-pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file