-
Notifications
You must be signed in to change notification settings - Fork 1
149 lines (120 loc) · 3.87 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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-22.04
env:
BNFC: 2.9.5
steps:
- 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: Install pandoc
run: |
sudo apt install pandoc
# - 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@v1
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@v2
# 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