-
Notifications
You must be signed in to change notification settings - Fork 14
64 lines (60 loc) · 1.89 KB
/
build.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
name: Build
permissions:
contents: write
on:
push:
branches: [ main ]
workflow_dispatch:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: chetan/git-restore-mtime-action@v2
- name: Cache 💾
uses: actions/cache@v4
with:
path: |
~/.cache
pandoc-3.2-1-amd64.deb
key: ${{ runner.os }}-pip-
restore-keys: ${{ runner.os }}-pip-
- name: Setup Python 🐍
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Setup pandoc ⚙️
run: |
sudo apt-get update
test -f pandoc-3.2-1-amd64.deb || wget https://github.com/jgm/pandoc/releases/download/3.2/pandoc-3.2-1-amd64.deb
sudo dpkg -i pandoc-3.2-1-amd64.deb
sudo apt-get install -y texlive texlive-xetex texlive-latex-extra lmodern librsvg2-bin fonts-symbola
pip install --upgrade pip
pip install Pygments pandoc-include
- name: Fetch previous version ⤵️
run: |
cd /home/runner/work/csci-1301.github.io/csci-1301.github.io/
wget https://github.com/csci-1301/csci-1301.github.io/releases/download/latest/release.zip && unzip -q release.zip && cd content && rsync -avR labs/*/*.zip ../
- name: Build 🏗️
run: make all
- name: Deploy website 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: content
clean: true
single-commit: true
- name: Create package 🎁
uses: crowbarmaster/GH-Automatic-Releases@latest
with:
automatic_release_tag: "latest"
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
draft: false
files: content/release.zip