Skip to content

Commit 47189f0

Browse files
committed
add documentation build phase
1 parent c5acd2f commit 47189f0

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,18 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
version:
18-
- '1' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
19-
os:
20-
- ubuntu-latest
18+
- '1'
19+
os: [ubuntu-latest] # adjust according to need, e.g. os: [ubuntu-latest] if testing only on linux
2120
arch:
2221
- x64
23-
2422
steps:
25-
# Cancel ongoing CI test runs if pushing to branch again before the previous tests
23+
# Cancel ongoing CI test runs if pushing to branch again before the previous tests
2624
# have finished
2725
- name: Cancel ongoing test runs for previous commits
2826
uses: styfle/[email protected]
2927
with:
3028
access_token: ${{ github.token }}
31-
29+
3230
# Do tests
3331
- uses: actions/checkout@v2
3432
- uses: julia-actions/setup-julia@v1
@@ -51,3 +49,31 @@ jobs:
5149
- uses: codecov/codecov-action@v1
5250
with:
5351
file: lcov.info
52+
docs:
53+
name: Documentation
54+
runs-on: ubuntu-latest
55+
steps:
56+
# Cancel ongoing documentation build if pushing to branch again before the previous
57+
# build is finished.
58+
- name: Cancel ongoing documentation builds for previous commits
59+
uses: styfle/[email protected]
60+
with:
61+
access_token: ${{ github.token }}
62+
63+
# Build docs
64+
- uses: actions/checkout@v2
65+
- uses: julia-actions/setup-julia@v1
66+
with:
67+
version: '1'
68+
- name: Instantiate and install dependencies
69+
run: |
70+
julia --project=docs -e '
71+
using Pkg
72+
Pkg.develop(PackageSpec(path=pwd()))
73+
Pkg.instantiate()'
74+
- name: Generate documentation and deploy
75+
env: # needed for pushing to gh-pages branch
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
78+
run:
79+
julia --project=docs docs/make.jl

0 commit comments

Comments
 (0)