Skip to content

Commit 976ff82

Browse files
committed
docs
1 parent 677d98e commit 976ff82

File tree

2 files changed

+77
-27
lines changed

2 files changed

+77
-27
lines changed

.github/workflows/CI.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,30 @@ jobs:
4141
with:
4242
files: lcov.info
4343

44-
docs:
45-
name: Documentation
46-
runs-on: ubuntu-latest
47-
permissions:
48-
contents: write
49-
statuses: write
50-
steps:
51-
- uses: actions/checkout@v3
52-
- uses: julia-actions/setup-julia@v1
53-
with:
54-
version: "1"
55-
- name: Configure doc environment
56-
run: |
57-
julia --project=docs/ -e '
58-
using Pkg
59-
Pkg.develop(PackageSpec(path=pwd()))
60-
Pkg.instantiate()'
61-
- uses: julia-actions/julia-buildpkg@v1
62-
- uses: julia-actions/julia-docdeploy@v1
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65-
- run: |
66-
julia --project=docs -e '
67-
using Documenter: DocMeta, doctest
68-
using MonitoredQuantumCircuits
69-
DocMeta.setdocmeta!(MonitoredQuantumCircuits, :DocTestSetup, :(using MonitoredQuantumCircuits); recursive=false)
70-
doctest(MonitoredQuantumCircuits)'
44+
# docs:
45+
# name: Documentation
46+
# runs-on: ubuntu-latest
47+
# permissions:
48+
# contents: write
49+
# statuses: write
50+
# steps:
51+
# - uses: actions/checkout@v3
52+
# - uses: julia-actions/setup-julia@v1
53+
# with:
54+
# version: "1"
55+
# - name: Configure doc environment
56+
# run: |
57+
# julia --project=docs/ -e '
58+
# using Pkg
59+
# Pkg.develop(PackageSpec(path=pwd()))
60+
# Pkg.instantiate()'
61+
# - uses: julia-actions/julia-buildpkg@v1
62+
# - uses: julia-actions/julia-docdeploy@v1
63+
# env:
64+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
# - run: |
66+
# julia --project=docs -e '
67+
# using Documenter: DocMeta, doctest
68+
# using MonitoredQuantumCircuits
69+
# DocMeta.setdocmeta!(MonitoredQuantumCircuits, :DocTestSetup, :(using MonitoredQuantumCircuits); recursive=false)
70+
# doctest(MonitoredQuantumCircuits)'

.github/workflows/documentation.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Documentation
2+
# This is a standard Julia setup for GitHub CI
3+
on:
4+
push:
5+
branches:
6+
- main # update to match your main branch
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
permissions:
13+
contents: write
14+
pull-requests: read
15+
statuses: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: julia-actions/setup-julia@v2
20+
with:
21+
version: '1'
22+
- uses: julia-actions/cache@v1
23+
24+
# Now this is where things focus on the documentation
25+
# build and deployment.
26+
27+
# IMPORTANT! If your documentation is for a Julia package,
28+
# with formal Julia package structure (`src` folder and top level Project.toml)
29+
# then you need to include this extra step (simply uncomment it):
30+
31+
- name: Develop local package
32+
run: julia -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
33+
34+
# The next steps continue with the `doc` folder build.
35+
36+
# This is really all you care about; 2-steps process
37+
# step 1, assumming the documentation Project.toml file is in `docs` folder
38+
- name: Install docs dependencies
39+
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
40+
# step 2 (note project path remains the same!)
41+
- name: Build and deploy
42+
env:
43+
# An access token must be provided to "push" the documentation build.
44+
# GitHub automates this via your account with this line:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
# See the discussion around "TagBot" in the Documenter.jl website:
47+
# https://documenter.juliadocs.org/stable/man/hosting/#GitHub-Actions
48+
# for automating creating tagged documentation builds after
49+
# registering your package in the Julia General Registry
50+
run: julia --project=docs/ docs/make.jl

0 commit comments

Comments
 (0)