Repository navigation
63 lines (60 loc) · 1.61 KB
/
Copy pathdeploy.yml
File metadata and controls
63 lines (60 loc) · 1.61 KB
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
name: Build and Deploy
on:
push:
branches:
- master
pull_request:
# The toolchain, GPU and MPI pages are generated from BinaryBuilderBase, Yggdrasil
# and the General registry, so rebuild weekly to pick up their changes.
schedule:
- cron: '0 6 * * 1'
workflow_dispatch:
permissions:
contents: read
jobs:
# Builds the site with read-only permissions, since it runs code downloaded from
# Yggdrasil (see utils.jl). Pull requests stop here.
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Install Julia
uses: julia-actions/setup-julia@v3
with:
version: '1'
- name: Build site
run: julia --project=. -e '
using Pkg; Pkg.instantiate();
using NodeJS; run(`$(npm_cmd()) install highlight.js`);
using Franklin;
optimize(minify=false)'
- name: Upload site
uses: actions/upload-artifact@v7
with:
name: site
path: __site
deploy:
needs: build
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Download site
uses: actions/download-artifact@v8
with:
name: site
path: __site
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: __site