From 7666f60edb5c75bab971dc246eb164d2d7565a46 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Thu, 25 Jan 2024 14:39:46 +0100 Subject: [PATCH] Deploy Applicative.pdf --- .github/workflows/deploy.yml | 59 ++++++++++++++++++++++++++++++++++++ Makefile | 18 ++++++++--- html/index.html | 13 ++++++++ 3 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/deploy.yml create mode 100644 html/index.html diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..a5454c3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,59 @@ +name: Deploy Applicative.pdf + +on: + push: { branches: [ master ] } + pull_request: { branches: [ master ] } + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + + - name: Local PATH + run: | + mkdir -p "${HOME}/.local/bin" + echo "${HOME}/.local/bin" >> "${GITHUB_PATH}" + + - name: Install tectonic + run: | + cd "${HOME}/.local/bin" + curl --proto '=https' --tlsv1.2 -fsSL https://drop-sh.fullyjustified.net | sh + + - name: Tectonic version + run: | + tectonic --version + + - uses: actions/checkout@v4 + + - name: Build web pages + run: make html + + - uses: actions/upload-pages-artifact@v3 + with: + path: html + + # Deploy job, see https://github.com/actions/deploy-pages/tree/f81ad71d2e78487340fb3a94726f2a6050466efd#readme + deploy: + if: github.ref == 'refs/heads/master' + # Add a dependency to the build job + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + # Specify runner + deployment step + runs-on: ubuntu-latest + steps: + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/Makefile b/Makefile index 391c5a3..ba85a2a 100644 --- a/Makefile +++ b/Makefile @@ -31,18 +31,28 @@ files=Makefile \ latex/agda.sty \ latex/Applicative.tex -.PHONY : default add all pack ship debugMake html - .PRECIOUS : %.pdf %.tex # %.dvi %.ps %.gz -default : Applicative.pdf # Applicative.pdf # cr-sk.pdf # +.PHONY: html +html: html/index.html html/Applicative.pdf + +html/Applicative.pdf : Applicative.tex template.tex + tectonic -o html/ $< + +# html/index.html: index.md +# pandoc --from=markdown --to=html5 --standalone --output=$@ $< + +.PHONY: default +default : Applicative.pdf +.PHONY: ship-Applicative ship-Applicative : $(destdir)/agda/Applicative.pdf # The generic rule does somehow not work .PHONY: ship-% ship-% : $(destdir)/agda/%.pdf +.PHONY: pack pack : Applicative.zip Applicative.zip : Applicative.pdf $(files) Applicative.bbl auto-Applicative.bib @@ -63,7 +73,7 @@ latex/%.tex : %.lagda.tex # initially, run latex once to create an .aux file # mark .aux file as fresh by creating a stamp _aux -Applicative_aux : Applicative.tex template.tex latex/Applicative.tex +Applicative_aux : Applicative.tex template.tex # latex/Applicative.tex -$(pdflatex) $<; touch $@; diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..c5ec176 --- /dev/null +++ b/html/index.html @@ -0,0 +1,13 @@ + + + + + + Applicative.pdf + + +
+