Skip to content

Commit

Permalink
fix gh action build for documentation (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecileane authored Oct 16, 2021
1 parent 63aea36 commit a55da20
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,22 @@ jobs:
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
- uses: julia-actions/julia-buildpkg@v1
- name: install dependencies
run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
Pkg.build("QuartetNetworkGoodnessFit")'
- run: |
- name: doc tests
run: |
julia --project=docs -e '
using Documenter: doctest
using QuartetNetworkGoodnessFit
doctest(QuartetNetworkGoodnessFit)'
- run: julia --project=docs docs/make.jl
- name: build and deploy doc
run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
28 changes: 28 additions & 0 deletions .github/workflows/doccleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Doc Preview Cleanup

on:
pull_request:
types: [closed]

jobs:
doc-preview-cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages

- name: Delete preview and history
run: |
git config user.name "Documenter.jl"
git config user.email "[email protected]"
git rm -rf "previews/PR$PRNUM"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
env:
PRNUM: ${{ github.event.number }}

- name: Push changes
run: |
git push --force origin gh-pages-new:gh-pages
3 changes: 1 addition & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433"
PhyloNetworks = "33ad39ac-ed31-50eb-9b15-43d0656eaa72"

[compat]
CSV = "0.8"
Documenter = "~0.26"
Documenter = "~0.27"

0 comments on commit a55da20

Please sign in to comment.