Skip to content

Commit

Permalink
Break up documentation build from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
stillyslalom committed Sep 3, 2022
1 parent 470fced commit f48b40d
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 25 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ jobs:
env:
PYTHON: ""
- uses: julia-actions/julia-runtest@v1
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
env:
PYTHON: ""
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using PyThermo
DocMeta.setdocmeta!(PyThermo, :DocTestSetup, :(using PyThermo); recursive=true)
doctest(PyThermo)'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
# docs:
# name: Documentation
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: julia-actions/setup-julia@v1
# with:
# version: '1'
# - run: |
# julia --project=docs -e '
# using Pkg
# Pkg.develop(PackageSpec(path=pwd()))
# Pkg.instantiate()'
# env:
# PYTHON: ""
# - run: |
# julia --project=docs -e '
# using Documenter: DocMeta, doctest
# using PyThermo
# DocMeta.setdocmeta!(PyThermo, :DocTestSetup, :(using PyThermo); recursive=true)
# doctest(PyThermo)'
# - run: julia --project=docs docs/make.jl
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
35 changes: 35 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Documentation

on:
push:
branches:
- main # update to match your development branch (master, main, dev, trunk, ...)
tags: '*'
pull_request:

jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.6'
- name: Install dependencies
run: |
julia --project=docs/ -e '
using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Test docs
run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using PyThermo
DocMeta.setdocmeta!(PyThermo, :DocTestSetup, :(using PyThermo); recursive=true)
doctest(PyThermo)'
- name: Build and deploy
env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
run: julia --project=docs/ docs/make.jl

0 comments on commit f48b40d

Please sign in to comment.