-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.65 KB
/
master.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
name: Master docs build
on:
push:
branches:
- master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: [1.6.0]
julia-arch: [x86]
os: [ubuntu-latest]
steps:
- name: Checkout current branch
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup Julia
uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Install dependencies
run: julia --project=docs -e 'using Pkg; Pkg.instantiate()'
- name: Setup environment variables
run: |
VERSION=`cat Project.toml | grep "version" | cut -d '=' -f2 | tr -d ' ' | tr -d '"' | tr -d \'`
echo "VERSION=${VERSION}" >> $GITHUB_ENV
REPO=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git
echo "REPO=${REPO}" >> $GITHUB_ENV
DEVBRANCH=master
echo "DEVBRANCH=${DEVBRANCH}" >> $GITHUB_ENV
IS_SNAPSHOT=`if [[ "${VERSION}" == 0.* ]] ; then echo "true" ; else echo "false" ; fi`
echo "IS_SNAPSHOT=${IS_SNAPSHOT}" >> $GITHUB_ENV
- name: Build, deploy and upload docs
run: julia --project=docs --color=yes docs/make_master.jl
env:
REPO: ${{ env.REPO }}
DEVBRANCH: ${{ env.DEVBRANCH }}
- name: Add google html file to docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
destination_dir: docs/
keep_files: true
exclude_assets: '!google*.html'