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 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