chore(README): update README #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
# Compile with latex-action | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v3 | |
with: | |
root_file: main.tex | |
pre_compile: | | |
tlmgr update --self | |
tlmgr install newpx | |
- name: Prepare Output Directory | |
run: | | |
mkdir -p output | |
mv main.pdf output/ | |
cp index.html output/ | |
- name: Upload Pages Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: output/ | |
# Deploy to GH Pages | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build_latex | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |