Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzoFabbri authored Jul 5, 2024
1 parent 3eaa347 commit 3ba3fbe
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,31 @@
name: Build and Deploy LaTeX document
permissions: write-all

on:
push:
branches:
- main
branches: [ "main" ]
pull_requests:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4.1.7
- uses: xu-cheng/latex-action@3.2.0
with:
root_file: main.tex
- uses: docker://ghcr.io/michal-h21/make4ht-action:latest
env:
command: "make4ht main.tex"
- uses: actions/upload-artifact@v4.3.3
with:
name: main-pdf
path: main.pdf
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/download-artifact@v4.1.7
with:
name: main-pdf
path: .
- uses: actions/configure-pages@v5.0.0
- uses: actions/upload-pages-artifact@v3.0.1
- uses: softprops/action-gh-release@v2.0.6
with:
path: .
- uses: actions/deploy-pages@v4.0.5
tag_name: Current
files: main.pdf
- uses: peaceiris/actions-gh-pages@v4.0.0
with:
token: ${{ secrets.GH_PAT }}
artifact_name: main.pdf
github_token: ${{ secrets.GH_PAT }}

0 comments on commit 3ba3fbe

Please sign in to comment.