automatic build & deploy PDF
* remove binary PDF blob from repo * action to build & upload on PR to main * action to build & upload to pages on merge to mainpull/168/head
parent
dbeb27a143
commit
f7ca76d5a9
|
|
@ -0,0 +1,45 @@
|
|||
name: Generate PDF
|
||||
|
||||
on:
|
||||
# allows manual triggering of the workflow
|
||||
workflow_dispatch:
|
||||
# run on changes to main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
# run on PRs to main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
# grant GITHUB_TOKEN permissions for pages deployment
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
# wraps a LaTeX build environment
|
||||
uses: xu-cheng/latex-action@v4
|
||||
with:
|
||||
root_file: M17_spec.tex
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Specification
|
||||
path: M17_spec.pdf
|
||||
|
||||
- name: Deploy
|
||||
# only deploy on pushes to main, not on PRs
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
uses: actions/deploy-pages@v4
|
||||
BIN
M17_spec.pdf
BIN
M17_spec.pdf
Binary file not shown.
Loading…
Reference in New Issue