-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to automate processing the docs when pushing a tag.
- Loading branch information
Showing
1 changed file
with
69 additions
and
0 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,69 @@ | ||
--- | ||
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
name: tag-based manual deploy of the LUMI Software Library | ||
on: | ||
push: | ||
tags: | ||
- '*'' | ||
permissions: | ||
contents: write # to fetch code (actions/checkout) + deploy docs to GitHub Pages (gh-pages branch) | ||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout # actions/checkout: See https://github.com/actions/checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: LUMI-EasyBuild-docs | ||
- name: checkout LUMI-SoftwareStack | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.repository_owner }}/LUMI-SoftwareStack | ||
path: LUMI-SoftwareStack | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
- name: checkout LUMI-EasyBuild-contrib | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.repository_owner }}/LUMI-EasyBuild-contrib | ||
path: LUMI-EasyBuild-contrib | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
- name: checkout LUMI-EasyBuild-containers | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.repository_owner }}/LUMI-EasyBuild-containers | ||
path: LUMI-EasyBuild-containers | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
- name: Checkout specific tags. | ||
run: | | ||
git config --global advice.detachedHead false | ||
cd $GITHUB_WORKSPACE/LUMI-SoftwareStack && git checkout tags/${{ github.event.ref }} | ||
cd $GITHUB_WORKSPACE/LUMI-EasyBuild-contrib && git checkout tags/${{ github.event.ref }} | ||
cd $GITHUB_WORKSPACE/LUMI-EasyBuild-containers && git checkout tags/${{ github.event.ref }} | ||
- name: set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: install mkdocs | ||
run: | | ||
pip install -r LUMI-EasyBuild-docs/config/requirements.txt | ||
mkdocs --version | ||
- name: build docs | ||
# We do a build first to ensure that building works as expected. | ||
# We don't use --strict as we do want to ignore some warnings. | ||
run: | | ||
cd LUMI-EasyBuild-docs && make build TAG=${{ github.event.ref }} | ||
- name: deploy docs | ||
run: | | ||
cd LUMI-EasyBuild-docs && make deploy-origin TAG=${{ github.event.ref }} | ||