diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 952a493..5b2ffec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,14 +35,37 @@ jobs: run: | jupyter-book build . # Book is now in _build/html + - name: prepare GitHub Pages action + uses: actions/upload-pages-artifact@v3.0.1 + with: + path: ./_build/html + # publish: + # needs: deploy-book + # runs-on: ubuntu-latest + # steps: + # # Push the book's HTML to github-pages + # - name: GitHub Pages action + # uses: peaceiris/actions-gh-pages@v3.6.1 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./_build/html publish: needs: deploy-book + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + # Specify runner + deployment step runs-on: ubuntu-latest steps: - # Push the book's HTML to github-pages - - name: GitHub Pages action - uses: peaceiris/actions-gh-pages@v3.6.1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_build/html \ No newline at end of file + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file