forked from hyperspy/hyperspy
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.53 KB
/
doc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Documentation
on: [push, pull_request]
jobs:
Build:
# Use the "reusable workflow" from the hyperspy organisation
uses: hyperspy/.github/.github/workflows/doc.yml@main
with:
# install with speed extra to avoid warnings
pip_extra_doc: 'doc,speed'
# graphviz is required to build mermaid graph
# optipng is required to optimize thumbnail
install_package_ubuntu: graphviz optipng
Push_dev:
needs: Build
# Push only on the "RELEASE_next_minor" and update the "dev" documentation
if: ${{ github.repository_owner == 'hyperspy' && github.ref_name == 'RELEASE_next_minor' }}
permissions:
# needs write permission to push the docs to gh-pages
contents: write
# Use the "reusable workflow" from the hyperspy organisation
uses: hyperspy/.github/.github/workflows/push_doc.yml@main
with:
repository: 'hyperspy/hyperspy-doc'
output_path: 'dev'
secrets:
access_token: ${{ secrets.PAT_DOCUMENTATION }}
Push_tag:
needs: Build
# Push only on tag and update the "current" documentation
if: ${{ github.repository_owner == 'hyperspy' && startsWith(github.ref, 'refs/tags/') }}
permissions:
# needs write permission to push the docs to gh-pages
contents: write
# Use the "reusable workflow" from the hyperspy organisation
uses: hyperspy/.github/.github/workflows/push_doc.yml@main
with:
repository: 'hyperspy/hyperspy-doc'
output_path: 'current'
secrets:
access_token: ${{ secrets.PAT_DOCUMENTATION }}