-
Notifications
You must be signed in to change notification settings - Fork 71
121 lines (105 loc) · 3.27 KB
/
pages.yaml
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
name: Build and deploy library website
on:
# To run this workflow manually
workflow_dispatch:
inputs:
ref:
description: the repository ref to build
required: true
default: master
push:
branches:
- master
# Cancel previous runs of the same branch
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}'
cancel-in-progress: true
jobs:
website:
runs-on: ubuntu-latest
strategy:
matrix:
agda: ['2.6.4']
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# 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
steps:
- name: Checkout our repository
uses: actions/checkout@v3
with:
path: master
# We need the entire history for contributor information
fetch-depth: 0
- name: Setup Agda
uses: wenkokke/[email protected]
with:
agda-version: ${{ matrix.agda }}
- uses: actions/cache/restore@v3
id: cache-agda-formalization
name: Restore Agda formalization cache
with:
path: master/_build
key:
${{ runner.os }}-check-${{ github.ref }}-${{ matrix.agda }}-${{
hashFiles('master/src/**') }}
restore-keys: |
${{ runner.os }}-check-${{ github.ref }}-${{ matrix.agda }}-
# Keep versions in sync with the Makefile
- name: MDBook setup
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.34'
- name: Install mdbook-pagetoc
uses: baptiste0928/cargo-install@v2
with:
crate: mdbook-pagetoc
version: '0.1.7'
- name: Install mdbook-katex
uses: baptiste0928/cargo-install@v2
with:
crate: mdbook-katex
version: '0.5.7'
- name: Install mdbook-linkcheck
uses: baptiste0928/cargo-install@v2
with:
crate: mdbook-linkcheck
version: '0.7.7'
- name: Install mdbook-catppuccin
uses: baptiste0928/cargo-install@v2
with:
crate: mdbook-catppuccin
version: '1.2.0'
- uses: actions/setup-python@v4
with:
python-version: '3.8'
check-latest: true
cache: 'pip'
- run: python3 -m pip install -r master/scripts/requirements.txt
- name: Generate book
env:
MDBOOK_PREPROCESSOR__GIT_METADATA__ENABLE: 'true'
run: |
cd master
make website
- name: Setup Pages
uses: actions/configure-pages@v3
if: >-
github.ref == 'refs/heads/master' || github.event_name ==
'workflow_dispatch'
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
if: >-
github.ref == 'refs/heads/master' || github.event_name ==
'workflow_dispatch'
with:
path: master/book/html
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1
id: deployment
if: >-
github.ref == 'refs/heads/master' || github.event_name ==
'workflow_dispatch'