Skip to content

Fix ambiguity in docs branch checkout in docs workflow #74

Fix ambiguity in docs branch checkout in docs workflow

Fix ambiguity in docs branch checkout in docs workflow #74

name: spectrumdevice-docs-pages
on:
push:
tags:
- '*'
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: |
python -m pip install --upgrade pip
python -m pip install .[doc]
- name: Create doc pages and commit to docs branch
run: |
git config --local user.name "crnbaker"
git config --local user.email "[email protected]"
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
export SPECTRUMDEVICE_VERSION=${{ github.ref_name }}
source generate_docs.sh
git add .
git commit -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