Merge branch 'main' of https://github.com/SpectrumInstrumentation/spc… #13
Workflow file for this run
This file contains hidden or 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
| name: spcm-core-pages | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: true | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| wget http://spectrum-instrumentation.com/dl/repo-key.asc | |
| gpg --dearmor -o repo-key.gpg repo-key.asc | |
| sudo cp repo-key.gpg /etc/apt/spectrum-instrumentation.gpg | |
| echo "deb [signed-by=/etc/apt/spectrum-instrumentation.gpg] http://spectrum-instrumentation.com/dl/ ./" > spectrum-instrumentation.list | |
| sudo cp spectrum-instrumentation.list /etc/apt/sources.list.d/spectrum-instrumentation.list | |
| sudo apt update | |
| sudo apt install -y libspcm-linux | |
| rm -f repo-key.asc repo-key.gpg spectrum-instrumentation.list | |
| python -m pip install --upgrade pip | |
| python -m pip install .[doc] | |
| python -m pip install -r requirements.txt | |
| - name: Create doc pages and commit to docs branch | |
| run: | | |
| git config --local user.name "SpectrumInstrumentation" | |
| git config --local user.email "info@spec.de" | |
| git fetch | |
| git status | |
| git checkout ${{ github.ref_name }} | |
| git branch ${{ github.ref_name }}-branch | |
| git switch docs | |
| git status | |
| git rebase ${{ github.ref_name }}-branch | |
| PDOC_ALLOW_EXEC=1 pdoc ./src/spcm_core -d numpy -o ./docs --logo "https://spectrum-instrumentation.com/img/logo-complete.png" --logo-link "https://spectrum-instrumentation.com/" --favicon https://spectrum-instrumentation.com/img/favicon.ico --footer-text "Spectrum Instrumentation GmbH" --mermaid --no-search --show-source | |
| git add . | |
| git commit --allow-empty -m 'Automatic documentation update ${{ github.ref_name }}' | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: docs | |
| force: true | |