Add "setting" ghcup installations to README (#9) #89
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 PLT www | |
on: | |
push: { branches: [ master, ci-* ] } | |
pull_request: { branches: [ master, ci-* ] } | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
BNFC: 2.9.5 | |
PANDOC: 3.5 | |
steps: | |
- name: Install pandoc | |
run: | | |
wget https://github.com/jgm/pandoc/releases/download/${PANDOC}/pandoc-${PANDOC}-1-amd64.deb | |
sudo dpkg -i pandoc-${PANDOC}-1-amd64.deb | |
# The ubuntu-shipped pandoc is too old to support e.g. 'title: ...' in md->html | |
# run: | | |
# sudo apt install pandoc | |
- name: Pandoc version | |
run: | | |
pandoc --version | |
- name: Local PATH | |
run: | | |
mkdir -p "${HOME}/.local/bin" | |
echo "${HOME}/.local/bin" >> "${GITHUB_PATH}" | |
- name: Setup Stack | |
run: | | |
stack config set system-ghc --global true | |
- 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 | |
- name: Install python 2.7 | |
run: | | |
sudo apt update | |
sudo apt install python2 | |
# - name: Set up Python 2 | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: ${{ '2.7' }} | |
- name: Info about the Python setup | |
run: | | |
echo "'python' is $(python --version)" | |
echo "'python2' is $(python2 --version)" | |
- name: Install txt2tags | |
run: | | |
echo "=== Downloading and patching txt2tags ===" | |
wget https://github.com/txt2tags/old/raw/master/txt2tags-2.6.tgz | |
tar xf txt2tags-2.6.tgz | |
mv txt2tags-2.6/txt2tags "${HOME}/.local/bin/" | |
# we change the first line to '#!/usr/bin/env python2' by appending a 2 | |
sed -i '1s/$/2/' "${HOME}/.local/bin/txt2tags" | |
chmod +x "${HOME}/.local/bin/txt2tags" | |
echo "=== Info about txt2tags ===" | |
echo "txt2tags is $(which txt2tags)" | |
head "$(which txt2tags)" | |
txt2tags --version | |
- name: Install BNFC ${{ env.BNFC }} | |
run: | | |
wget https://github.com/BNFC/bnfc/releases/download/v${{ env.BNFC }}/bnfc-${{ env.BNFC }}-linux.binary | |
mv bnfc-${{ env.BNFC }}-linux.binary "${HOME}/.local/bin/bnfc" | |
chmod +x "${HOME}/.local/bin/bnfc" | |
# - name: Setup TeX Live | |
# uses: teatimeguest/setup-texlive-action@v2 | |
# with: | |
# packages: >- | |
# scheme-basic | |
# graphics | |
# hyperref | |
# lkproof | |
# paralist | |
# ulem | |
# xcolor | |
# etoolbox | |
# # plain | |
- uses: actions/checkout@v4 | |
- name: Build pages | |
run: | | |
make pdflatex=tectonic | |
# - name: Setup Pages | |
# uses: actions/configure-pages@v3 | |
# # Needed? https://github.com/actions/starter-workflows/issues/1996 | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: . | |
# Testing would require us to install all of GHC 8.4.4 - 9.8.1 | |
# - name: Test | |
# run: | | |
# make test | |
# 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: Setup Pages | |
# uses: actions/configure-pages@v3 | |
# # Needed? https://github.com/actions/starter-workflows/issues/1996 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
# Old deploy | |
# | |
# - name: Deploy | |
# uses: peaceiris/actions-gh-pages@v3 | |
# if: github.ref == 'refs/heads/master' | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# publish_dir: . | |
# force_orphan: true | |
# destination_dir: public_html |