File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ name: Docs
2
2
3
3
# Generate the documentation on all merges to main, all pull requests, or by
4
4
# manual workflow dispatch. The build job can be used as a CI check that the
5
- # docs still build successfully. The deploy job only runs when a tag is
6
- # pushed and actually moves the generated html to the gh-pages branch
7
- # (which triggers a GitHub pages deployment).
5
+ # docs still build successfully. The deploy job which moves the generated
6
+ # html to the gh-pages branch and triggers a GitHub pages deployment
7
+ # only runs when a tag is pushed or when the workflow is manually dispatched
8
+ # from the main branch.
8
9
on :
9
10
push :
10
11
branches :
19
20
20
21
linting :
21
22
# scheduled workflows should not run on forks
22
- if : (${{ github.event_name == 'schedule' }} && ${{ github.repository_owner == 'neuroinformatics-unit' }} && ${{ github.ref == 'refs/heads/main' }}) || (${{ github.event_name != 'schedule' }})
23
+ if : |
24
+ (github.event_name == 'schedule' &&
25
+ github.repository_owner == 'neuroinformatics-unit' &&
26
+ github.ref == 'refs/heads/main') ||
27
+ (github.event_name != 'schedule')
23
28
runs-on : ubuntu-latest
24
29
steps :
25
30
- uses : neuroinformatics-unit/actions/lint@v2
45
50
needs : build_sphinx_docs
46
51
permissions :
47
52
contents : write
48
- if : (github.event_name == 'push' && github.ref_type == 'tag') || github.event_name == 'workflow_dispatch'
53
+ if : |
54
+ (github.event_name == 'push' && github.ref_type == 'tag') ||
55
+ (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
49
56
runs-on : ubuntu-latest
50
57
steps :
51
58
- uses : neuroinformatics-unit/actions/deploy_sphinx_docs@main
Original file line number Diff line number Diff line change @@ -207,10 +207,9 @@ Other `.md` or `.rst` files are linked to the homepage via the `toctree` direct
207
207
We use [ Sphinx] ( sphinx-doc: ) and the [ PyData Sphinx Theme] ( https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html )
208
208
to build the source files into HTML output.
209
209
This is handled by a GitHub actions workflow (` .github/workflows/docs_build_and_deploy.yml ` ).
210
- The build job is triggered on each PR, ensuring that the documentation build is not broken by new changes.
211
- The deployment job is only triggered whenever a tag is pushed to the _ main_ branch,
212
- ensuring that the documentation is published in sync with each PyPI release.
213
-
210
+ The build job runs on each PR, ensuring that the documentation build is not broken by new changes.
211
+ The deployment job runs on tag pushes (for PyPI releases) or manual triggers on the _ main_ branch.
212
+ This keeps the documentation aligned with releases, while allowing manual redeployment when necessary.
214
213
215
214
### Editing the documentation
216
215
To edit the documentation, first clone the repository, and install ` movement ` in a
You can’t perform that action at this time.
0 commit comments