-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.04 KB
/
build-and-deploy.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
name: Build and Deploy
on:
push:
branches:
- master
permissions:
id-token: write
pages: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install Jinja2
run: pip install jinja2-cli "jinja2-cli[yaml]"
- name: Build
run: make all
- name: Minify HTML and CSS
run: |
curl -L https://github.com/wilsonzlin/minify-html/releases/download/v0.15.0/minhtml-0.15.0-x86_64-unknown-linux-gnu > minhtml
chmod +x minhtml
./minhtml --keep-closing-tags --minify-css dist/*.html dist/*.css
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4