Skip to content

Commit 9413079

Browse files
authored
Create separate documentation workflow (#705)
* Create separate documentation workflow * Add Documenter as a required merge queue check * Comment fix * fixup! Comment fix * Remove `merge_group` trigger from Documenter workflow
1 parent 4924cb8 commit 9413079

File tree

3 files changed

+52
-316
lines changed

3 files changed

+52
-316
lines changed

.github/workflows/CI.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
test:
1313
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
1414
if: ${{ github.event_name != 'pull_request' }} # Avoid running on PRs as OIDC will fail when running on a fork
15+
# These permissions are needed to:
16+
# - Checking out the repository (`contents: read`)
17+
# - Interact with GitHub's OIDC Token endpoint: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#adding-permissions-settings
18+
# - Delete old caches: https://github.com/julia-actions/cache#usage
1519
permissions:
16-
# Required for interacting with GitHub's OIDC Token endpoint:
17-
# - Checking out the repository (`contents: read`)
18-
# - Interact with GitHub's OIDC Token endpoint: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#adding-permissions-settings
19-
# - Delete old caches: https://github.com/julia-actions/cache#usage
2020
actions: write
2121
contents: read
2222
id-token: write
@@ -78,21 +78,6 @@ jobs:
7878
- uses: julia-actions/julia-buildpkg@v1
7979
- uses: julia-actions/julia-runtest@v1
8080

81-
docs:
82-
name: Documentation
83-
runs-on: ubuntu-latest
84-
steps:
85-
- uses: actions/checkout@v4
86-
- uses: julia-actions/setup-julia@v2
87-
with:
88-
version: "1"
89-
- uses: julia-actions/cache@v2
90-
- uses: julia-actions/julia-buildpkg@v1
91-
- uses: julia-actions/julia-docdeploy@v1
92-
env:
93-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
95-
9681
# Merge queues only wait for the required status checks to pass which are defined in the
9782
# repository settings under the branch protection rules. Unfortunately, the required
9883
# status checks for PRs and merge queues must be the identical even though the workflows

.github/workflows/Documenter.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Documenter
2+
on:
3+
pull_request:
4+
paths:
5+
- "docs/**"
6+
- "src/**"
7+
- "Project.toml"
8+
- ".github/workflows/Documenter.yml"
9+
push:
10+
tags: ["*"]
11+
branches:
12+
- main
13+
paths:
14+
- "docs/**"
15+
- "src/**"
16+
- "Project.toml"
17+
- ".github/workflows/Documenter.yml"
18+
workflow_dispatch:
19+
jobs:
20+
docs:
21+
name: Build
22+
# These permissions are needed to:
23+
# - Deploying documentation: https://documenter.juliadocs.org/stable/man/hosting/#Permissions
24+
# - Delete old caches: https://github.com/julia-actions/cache#usage
25+
permissions:
26+
actions: write
27+
contents: write
28+
statuses: write
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: julia-actions/setup-julia@v2
33+
with:
34+
version: "1"
35+
- uses: julia-actions/cache@v2
36+
- name: Install dependencies
37+
shell: julia --project=docs --color=yes {0}
38+
run: |
39+
using Pkg
40+
Pkg.develop(PackageSpec(path=pwd()))
41+
Pkg.instantiate()
42+
- name: Build docs
43+
uses: julia-actions/julia-docdeploy@v1
44+
with:
45+
install-package: false # Avoid instantiating twice
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

docs/Manifest.toml

Lines changed: 0 additions & 297 deletions
This file was deleted.

0 commit comments

Comments
 (0)