Skip to content

Commit 966490e

Browse files
authored
Switch to Xranklin and fix a few things (#58)
* Switch to Xranklin and fix a few things * More Xranklin replacements * Switch yml
1 parent 8443216 commit 966490e

File tree

8 files changed

+365
-103
lines changed

8 files changed

+365
-103
lines changed

.github/workflows/Deploy-PR.yml

Lines changed: 30 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,34 @@ on:
44
jobs:
55
build-and-deploy:
66
runs-on: ubuntu-latest
7-
permissions:
8-
contents: write
97
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v2
12-
with:
13-
persist-credentials: false
14-
# NOTE: Python is necessary for the pre-rendering (minification) step
15-
- name: Install python
16-
uses: actions/setup-python@v2
17-
with:
18-
python-version: '3.8'
19-
# NOTE: Here you can install dependencies such as matplotlib if you use
20-
# packages such as PyPlot.
21-
# - run: pip install matplotlib
22-
- name: Install Julia
23-
uses: julia-actions/setup-julia@v1
24-
with:
25-
version: '1' # Latest stable Julia release.
26-
# NOTE
27-
# The steps below ensure that NodeJS and Franklin are loaded then it
28-
# installs highlight.js which is needed for the prerendering step
29-
# (code highlighting + katex prerendering).
30-
# Then the environment is activated and instantiated to install all
31-
# Julia packages which may be required to successfully build your site.
32-
# The last line should be `optimize()` though you may want to give it
33-
# specific arguments, see the documentation or ?optimize in the REPL.
34-
- run: julia -e '
35-
using Pkg; Pkg.activate("."); Pkg.instantiate();
36-
using NodeJS; run(`$(npm_cmd()) install highlight.js`);
37-
using Franklin;
38-
optimize(clear=true)'
39-
- name: Build and Deploy
40-
uses: JamesIves/github-pages-deploy-action@releases/v3
41-
with:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
BRANCH: gh-pages-pr
44-
FOLDER: __site
8+
- name: Git checkout
9+
uses: actions/checkout@v3
10+
11+
- name: Cache
12+
uses: actions/cache@v2
13+
with:
14+
path: |
15+
__cache
16+
~/.julia
17+
key: ${{ runner.os }}-franklin-cache-${{ github.sha }}
18+
restore-keys: ${{ runner.os }}-franklin-cache-
19+
20+
# Julia
21+
- name: Install Julia
22+
uses: julia-actions/setup-julia@v1
23+
with:
24+
version: 1
25+
26+
# Website build
27+
- run: julia -e '
28+
using Pkg; Pkg.add(url="https://github.com/tlienart/Xranklin.jl", rev="main");
29+
using Xranklin; build();'
30+
31+
# Deployment and caching
32+
- run: touch __site/.nojekyll
33+
- name: Deploy 🚀
34+
uses: JamesIves/github-pages-deploy-action@releases/v4
35+
with:
36+
BRANCH: gh-pages-pr
37+
FOLDER: __site

.github/workflows/Deploy.yml

Lines changed: 30 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,37 @@ on:
33
push:
44
branches:
55
- main
6-
concurrency:
7-
# Skip intermediate builds: always.
8-
# Cancel intermediate builds: only if it is a pull request build.
9-
group: ${{ github.workflow }}-${{ github.ref }}
10-
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
116
jobs:
127
build-and-deploy:
138
runs-on: ubuntu-latest
14-
permissions:
15-
contents: write
169
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v2
19-
with:
20-
persist-credentials: false
21-
# NOTE: Python is necessary for the pre-rendering (minification) step
22-
- name: Install python
23-
uses: actions/setup-python@v2
24-
with:
25-
python-version: '3.8'
26-
# NOTE: Here you can install dependencies such as matplotlib if you use
27-
# packages such as PyPlot.
28-
# - run: pip install matplotlib
29-
- name: Install Julia
30-
uses: julia-actions/setup-julia@v1
31-
with:
32-
version: '1' # Latest stable Julia release.
33-
# NOTE
34-
# The steps below ensure that NodeJS and Franklin are loaded then it
35-
# installs highlight.js which is needed for the prerendering step
36-
# (code highlighting + katex prerendering).
37-
# Then the environment is activated and instantiated to install all
38-
# Julia packages which may be required to successfully build your site.
39-
# The last line should be `optimize()` though you may want to give it
40-
# specific arguments, see the documentation or ?optimize in the REPL.
41-
- run: julia -e '
42-
using Pkg; Pkg.activate("."); Pkg.instantiate();
43-
using NodeJS; run(`$(npm_cmd()) install highlight.js`);
44-
using Franklin;
45-
optimize(clear=true)'
46-
- name: Build and Deploy
47-
uses: JamesIves/github-pages-deploy-action@releases/v3
48-
with:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
BRANCH: gh-pages
51-
FOLDER: __site
10+
- name: Git checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Cache
14+
uses: actions/cache@v2
15+
with:
16+
path: |
17+
__cache
18+
~/.julia
19+
key: ${{ runner.os }}-franklin-cache-${{ github.sha }}
20+
restore-keys: ${{ runner.os }}-franklin-cache-
21+
22+
# Julia
23+
- name: Install Julia
24+
uses: julia-actions/setup-julia@v1
25+
with:
26+
version: 1
27+
28+
# Website build
29+
- run: julia -e '
30+
using Pkg; Pkg.add(url="https://github.com/tlienart/Xranklin.jl", rev="main");
31+
using Xranklin; build();'
32+
33+
# Deployment and caching
34+
- run: touch __site/.nojekyll
35+
- name: Deploy 🚀
36+
uses: JamesIves/github-pages-deploy-action@releases/v4
37+
with:
38+
BRANCH: gh-pages
39+
FOLDER: __site

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
__cache/
12
__site/
23
.DS_Store
34
node_modules/
45
package-lock.json
56
.vscode
6-
Manifest.toml
7+
# Manifest.toml
78

89
MyPackage/
910
MyProject/

0 commit comments

Comments
 (0)