-
-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation to GitHub workflows (#7411)
* Add docs.yml workflow to deploy latest docs from main branch * Adjust heading of documentation to say 4.4 * 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 <[email protected]>
- Loading branch information
1 parent
5215262
commit d73e099
Showing
5 changed files
with
55 additions
and
6 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: | ||
- main | ||
paths: | ||
- "docs/manual/**" | ||
pull_request: | ||
branches: | ||
- main | ||
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.4 Latest" --no-redirect --update-aliases 4.4 latest | ||
- name: deploy latest docs to gh-pages branch | ||
if: ${{ github.event_name != 'pull_request' }} | ||
working-directory: docs/manual | ||
run: | | ||
mike deploy --push --title "4.4 Latest" --no-redirect --update-aliases 4.4 latest |
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