From e87658ff470b3bf5dd75ad74eef8dea175374c2f Mon Sep 17 00:00:00 2001 From: naeemkh Date: Sun, 22 Oct 2023 15:55:39 -0400 Subject: [PATCH 1/2] add actions to check building pages --- .github/workflows/build_pages.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/build_pages.yml diff --git a/.github/workflows/build_pages.yml b/.github/workflows/build_pages.yml new file mode 100644 index 00000000..f7bc080e --- /dev/null +++ b/.github/workflows/build_pages.yml @@ -0,0 +1,24 @@ +name: Check for build + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Quarto + uses: quarto-dev/quarto-actions/setup@v2 + - name: Build + run: quarto render + - name: Upload artifact + if: ${{ github.event_name == 'pull_request' }} + uses: actions/upload-artifact@v3 + with: + name: _book + path: _book + + \ No newline at end of file From 87e7f205a925357de32c20608833066f2cd853fa Mon Sep 17 00:00:00 2001 From: naeemkh Date: Sun, 22 Oct 2023 15:57:03 -0400 Subject: [PATCH 2/2] add workflow to deploy pages --- .github/workflows/deploy_page.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/deploy_page.yml diff --git a/.github/workflows/deploy_page.yml b/.github/workflows/deploy_page.yml new file mode 100644 index 00000000..58e499f8 --- /dev/null +++ b/.github/workflows/deploy_page.yml @@ -0,0 +1,20 @@ +name: Deploy page +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Quarto + uses: quarto-dev/quarto-actions/setup@v2 + - name: Build + run: quarto render + + - name: Deploy to GitHub Pages + if: ${{ github.ref == 'refs/heads/main' }} + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_book \ No newline at end of file