Skip to content

Commit

Permalink
Update GitHub Actions to use modern deployment features
Browse files Browse the repository at this point in the history
  • Loading branch information
arcatdmz committed Jun 25, 2024
1 parent 3a84ced commit 042a0fb
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 042a0fb

Please sign in to comment.