mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-11-15 07:03:52 +01:00
10.1.0/upload documentation workflow (#1617)
* Fix/automate documentation (#1611)
* also update developer
* mofified for testing
* fixed error message
* temporarily disable all workflows
* reference branch with /ref/head
* force cherry-pick
* allow empty commit
* set write permissions
* dont push update when updating version
* Revert "temporarily disable all workflows"
This reverts commit d8c67354d6.
* use indices from relese list
* removed versions.yaml
* always sort the releases
* forgot to use github token (#1616)
* forgot to use github token
* fix for minor version
This commit is contained in:
1 parent
ecdee14999
commit
6df1aba669
5 files changed
+106
-171
No files matched your search
@@ -26,9 +26,9 @@ jobs:
|
||||
build-and-deploy:
|
||||
strategy:
|
||||
matrix:
|
||||
patform: [ubuntu-latest]
|
||||
platform: [ubuntu-latest]
|
||||
python-version: ["3.12"]
|
||||
runs-on: ${{ matrix.patform }}
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -74,24 +74,31 @@ jobs:
|
||||
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSLS_BUILD_DOCS=ON -DSLS_USE_HDF5=ON -DSLS_USE_PYTHON=ON ..
|
||||
make -j4
|
||||
make docs
|
||||
|
||||
# Update main index if this is a release
|
||||
- name: Update version index
|
||||
|
||||
|
||||
- name: Render Documentation index
|
||||
if: github.event_name == 'release'
|
||||
run: |
|
||||
python docs/main_index/render_main_index.py \
|
||||
--version "${{ steps.version.outputs.version }}" \
|
||||
--date "$(date +'%d.%m.%Y')"
|
||||
|
||||
gh release list --json tagName,publishedAt > releases.json
|
||||
python docs/main_index/render_main_index.py --json_releases releases.json --new_version ${{ steps.version.outputs.version }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout gh-pages
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: gh-pages
|
||||
path: gh-pages
|
||||
|
||||
- name: Copy documentation to versioned folder for developer branch
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/developer'
|
||||
run: |
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
mkdir -p "gh-pages/${VERSION}"
|
||||
cp -r build/docs/html/. "gh-pages/${VERSION}/"
|
||||
|
||||
|
||||
- name: Copy documentation and Release notes to versioned folder
|
||||
if: github.event_name == 'release' || (github.event_name == 'push')
|
||||
if: github.event_name == 'release'
|
||||
run: |
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
mkdir -p "gh-pages/${VERSION}"
|
||||
|
||||
Reference in new issue
Block a user