forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (86 loc) · 2.34 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
name: Deploy site
on:
push:
branches:
- master
- main
paths:
- "assets/**"
- "**.html"
- "**.js"
- "**.liquid"
- "**/*.md"
- "**.yml"
- "!.github/workflows/axe.yml"
- "!.github/workflows/broken-links.yml"
- "!.github/workflows/deploy-docker-tag.yml"
- "!.github/workflows/deploy-image.yml"
- "!.github/workflows/docker-slim.yml"
- "!.github/workflows/lighthouse-badger.yml"
- "!.github/workflows/prettier.yml"
- "!lighthouse_results/**"
- "!CONTRIBUTING.md"
- "!CUSTOMIZE.md"
- "!FAQ.md"
- "!INSTALL.md"
- "!README.md"
pull_request:
branches:
- master
- main
paths:
- "assets/**"
- "**.html"
- "**.js"
- "**.liquid"
- "**/*.md"
- "**.yml"
- "!.github/workflows/axe.yml"
- "!.github/workflows/broken-links.yml"
- "!.github/workflows/deploy-docker-tag.yml"
- "!.github/workflows/deploy-image.yml"
- "!.github/workflows/docker-slim.yml"
- "!.github/workflows/lighthouse-badger.yml"
- "!.github/workflows/prettier.yml"
- "!lighthouse_results/**"
- "!CONTRIBUTING.md"
- "!CUSTOMIZE.md"
- "!FAQ.md"
- "!INSTALL.md"
- "!README.md"
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
# available images: https://github.com/actions/runner-images#available-images
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.2"
bundler-cache: true
- name: Update _config.yml ⚙️
uses: fjogeleit/yaml-update-action@main
with:
commitChange: false
valueFile: "_config.yml"
propertyPath: "giscus.repo"
value: ${{ github.repository }}
- name: Install and Build 🔧
run: |
pip3 install --upgrade jupyter
export JEKYLL_ENV=production
bundle exec jekyll build --lsi
- name: Purge unused CSS 🧹
run: |
npm install -g purgecss
purgecss -c purgecss.config.js
- name: Deploy 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _site