This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 29
65 lines (58 loc) · 2 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
name: Build and Deploy
on:
push:
branches:
- main
- master
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
# Required by julia-actions/cache.
actions: write
# For the push to `gh-pages` branch.
contents: write
env:
JULIA_NUM_THREADS: "auto"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Node
uses: actions/setup-node@v4
- run: npm install highlight.js
- name: Install Julia
uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v2
# NOTE
# The steps below ensure that NodeJS and Franklin are loaded then it
# installs highlight.js which is needed for the prerendering step
# (code highlighting + katex prerendering).
# Then the environment is activated and instantiated to install all
# Julia packages which may be required to successfully build your site.
# The last line should be `optimize()` though you may want to give it
# specific arguments, see the documentation or ?optimize in the REPL.
- run: julia --color=yes -e '
using Pkg;
Pkg.activate("."); Pkg.instantiate();
using NodeJS; run(`$(npm_cmd()) install highlight.js`);
using Franklin;
optimize(); verify_links();' > build.log
env:
# Allows the use of unicode characters in Plots.jl
GKS_ENCODING: "utf8"
# Fixes 'GKS: can't connect to GKS socket application' errors
# and quality of output plots in GR back end.
GKSwstype: "100"
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: __site
# To reduce state.
clean: true
# To save space; we don't really need older versions.
single-commit: true