Skip to content

Commit

Permalink
Deploy Applicative.pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jan 25, 2024
1 parent 29c9988 commit 7666f60
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 4 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 $@;

Expand Down
13 changes: 13 additions & 0 deletions html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Applicative.pdf</title>
</head>
<body>
<div style="position: fixed; width: 100%; height: 100%;">
<iframe src="Applicative.pdf" style="display: block; width: 100%; height: 100%;"/>
</div>
</body>
</html>

0 comments on commit 7666f60

Please sign in to comment.