Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
upload

GitHub Action

Deploy package documentation

v1.1.0

Deploy package documentation

upload

Deploy package documentation

Build and deploy the documentation for a Julia package

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Deploy package documentation

uses: julia-actions/julia-docdeploy@v1.1.0

Learn more about this action in julia-actions/julia-docdeploy

Choose a version

julia-docdeploy

Usage

name: Documenter
on:
  push:
    branches: [master]
    tags: [v*]
  pull_request:

jobs:
  Documenter:
    name: Documentation
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: julia-actions/julia-buildpkg@latest
      - uses: julia-actions/julia-docdeploy@latest
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

You need DOCUMENTER_KEY for deployement, which you can generate using DocumenterTools:

julia> using DocumenterTools, YourPackage
julia> DocumenterTools.genkeys(YourPackage)

If you need to build your documentation on a particular Julia version, you can insert

      - uses: julia-actions/setup-julia@v1
        with:
          version: nightly               # replace this with whatever version you need
          show-versioninfo: true         # this causes versioninfo to be printed to the action log

as the first entry after steps:.

Prefixing the Julia command

In some packages, you may want to prefix the julia command with another command, e.g. for running tests of certain graphical libraries with xvfb-run. In that case, you can add an input called prefix containing the command that will be inserted to your workflow:

      - uses: julia-actions/julia-docdeploy@v1
        with:
          prefix: xvfb-run