Skip to content

Remove reference to online PDF version from README #43

Remove reference to online PDF version from README

Remove reference to online PDF version from README #43

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["master", "main", "6-html-support"]
# 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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build_assets: # Job for PDF and HTML compilation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Compile main.tex to PDF
run: |
docker run --rm --user $(id -u):$(id -g) \
-v "${{ github.workspace }}":/workdir \
-w /workdir \
ghcr.io/xu-cheng/texlive-full:latest \
sh -c "latexmk -C main.tex && latexmk -pdf -interaction=nonstopmode -halt-on-error -file-line-error main.tex"
- name: Compile main.tex to HTML
run: |
docker run --rm --user $(id -u):$(id -g) \
-v "${{ github.workspace }}":/workdir \
-w /workdir \
ghcr.io/xu-cheng/texlive-full:latest \
sh -c "rm -rf main-html && make4ht main.tex 'xhtml,css-in' -d main-html"
- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: pdf-output
path: main.pdf
- name: Upload HTML artifact
uses: actions/upload-artifact@v4
with:
name: html-output
path: main-html/
# Single deploy job since we're just deploying
deploy:
# Only deploy from the protected default branch (support common names)
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
needs: [build_assets]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
if: ${{ !env.ACT }}
with:
path: artifacts/
- name: Prepare public directory for Pages
if: ${{ !env.ACT }}
run: |
mkdir public
# Move assets to public/
mv artifacts/pdf-output/main.pdf public/
mv artifacts/html-output public/main-html
# Create a simple index page
echo '<html><head><title>ALP Tutorial Artifacts</title></head><body>' > public/index.html
echo '<h1>ALP Tutorial Artifacts</h1><ul>' >> public/index.html
echo '<li><a href="main.pdf">Main PDF</a></li>' >> public/index.html
echo '<li><a href="main-html/main.html">Main HTML</a></li>' >> public/index.html
echo '</ul></body></html>' >> public/index.html
ls -lR public
- name: Setup Pages
if: ${{ !env.ACT }}
uses: actions/configure-pages@v5
- name: Upload Pages artifact
if: ${{ !env.ACT }}
uses: actions/upload-pages-artifact@v3
with:
path: ./public
- name: Deploy to GitHub Pages
if: ${{ !env.ACT }}
id: deployment
uses: actions/deploy-pages@v4