diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 4175191..a64ad4b 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,11 +1,30 @@ name: github-pages on: + # Runs on pushes targeting the default branch push: branches: - main + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + jobs: deploy: name: github-pages + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} if: "!contains(github.event.head_commit.message, 'skip ci')" runs-on: ubuntu-latest container: arcatdmz/texlive @@ -14,8 +33,11 @@ jobs: uses: actions/checkout@v2 - name: Build PDF file run: latexmk -pdf && latexmk -c && mkdir -p docs && cp *.pdf ./docs/ - - name: Deploy pages - uses: peaceiris/actions-gh-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs + # Upload "docs" directory + path: "docs" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1