I am confused as to how to deploy my package’s documentation per version. I use Github Actions, and followed the docs for tagbot and documenter.jl, but something still escapes me.
Here is my Tagbot config:
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.SSH_KEY }}
Note that I am using secrets.SSH_KEY
based on this section in TagBot’s docs.
Here is my .github/workflows/Documentation.yml
file (unmodified from the docs):
on:
push:
branches:
- master
tags: '*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.6'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- 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
I am also unsure how to set up the environment properly to call deploydocs()
locally. The docs for deploydocs
mention:
deploydocs
will automatically figure out whether it is deploying the documentation for a tagged release or just a development branch (usually, based on the environment variables set by the CI system).
I wasn’t able to find how to set up that environment myself locally; the Deployment Systems section talks about the different CIs but not local deployment, or how to specify information about which version to deploy.
Any help is greatly appreciated!