-
-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[backport 4.2.x] Add documentation to GitHub workflows (#7415)
Backport of #7411. * Add docs.yml workflow to deploy stable docs from 4.2.x branch * Adjust heading of documentation to say 4.2 * Build the docs in PRs that modify /docs/manuals folder contents. * Only deploy the built docs if not building a PR. --------- Co-authored-by: Juan Luis Rodríguez <juanluisrp@gmail.com>
- Loading branch information
1 parent
c61fde0
commit 9e4db43
Showing
6 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- 4.2.x | ||
paths: | ||
- "docs/manual/**" | ||
pull_request: | ||
branches: | ||
- 4.2.x | ||
paths: | ||
- "docs/manual/**" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout GeoNetwork | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- name: mkdocs install | ||
run: pip install --upgrade pip && pip install -r docs/manual/requirements.txt | ||
- name: git configuration | ||
run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: build docs without publishing them | ||
if: ${{ github.event_name == 'pull_request' }} | ||
working-directory: docs/manual | ||
run: | | ||
mike deploy --title "4.2 Stable" --no-redirect --update-aliases 4.2 stable | ||
- name: deploy 4.2 docs to gh-pages branch | ||
if: ${{ github.event_name != 'pull_request' }} | ||
working-directory: docs/manual | ||
run: | | ||
mike deploy --push --title "4.2 Stable" --no-redirect --update-aliases 4.2 stable |
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
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
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
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
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