ignore docs Manifest #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation | |
# This is a standard Julia setup for GitHub CI | |
on: | |
push: | |
branches: | |
- main # update to match your main branch | |
tags: '*' | |
pull_request: | |
jobs: | |
build: | |
permissions: | |
contents: write | |
pull-requests: read | |
statuses: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: '1' | |
- uses: julia-actions/cache@v1 | |
# Now this is where things focus on the documentation | |
# build and deployment. | |
# IMPORTANT! If your documentation is for a Julia package, | |
# with formal Julia package structure (`src` folder and top level Project.toml) | |
# then you need to include this extra step (simply uncomment it): | |
- name: Develop local package | |
run: julia -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()' | |
# The next steps continue with the `doc` folder build. | |
# This is really all you care about; 2-steps process | |
# step 1, assumming the documentation Project.toml file is in `docs` folder | |
- name: Install docs dependencies | |
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()' | |
# step 2 (note project path remains the same!) | |
- name: Build and deploy | |
env: | |
# An access token must be provided to "push" the documentation build. | |
# GitHub automates this via your account with this line: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# See the discussion around "TagBot" in the Documenter.jl website: | |
# https://documenter.juliadocs.org/stable/man/hosting/#GitHub-Actions | |
# for automating creating tagged documentation builds after | |
# registering your package in the Julia General Registry | |
run: julia --project=docs/ docs/make.jl |