diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index c3ab6ed..1378f53 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -20,6 +20,8 @@ jobs: steps: # Check out repo and set up Python - uses: actions/checkout@v4 + with: + fetch-depth: 0 # see https://stackoverflow.com/questions/57612428/cloning-private-github-repository-within-organisation-in-actions and https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key - name: Fetch test data @@ -57,22 +59,6 @@ jobs: mkdir -p $GITHUB_WORKSPACE/docs/src/specsscan cp -r $GITHUB_WORKSPACE/src/specsscan/config $GITHUB_WORKSPACE/docs/src/specsscan - - name: Change version for develop build - if: startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/main' - run: | - VERSION=`sed -n 's/^version = "\(.*\)".*/\1/p' $GITHUB_WORKSPACE/pyproject.toml` - MOD_VERSION=$VERSION".dev0" - echo $MOD_VERSION - sed -i "s/^version = \"$VERSION\"/version = \"$MOD_VERSION\"/" $GITHUB_WORKSPACE/pyproject.toml - - - name: Change version for release build - if: startsWith(github.ref, 'refs/tags/') - run: | - OLD_VERSION=`sed -n 's/^version = "\(.*\)".*/\1/p' $GITHUB_WORKSPACE/pyproject.toml` - NEW_VERSION=`echo ${GITHUB_REF#refs/tags/} | sed -n 's/^v\(.*\)/\1/p'` - echo $NEW_VERSION - sed -i "s/^version = \"$OLD_VERSION\"/version = \"$NEW_VERSION\"/" $GITHUB_WORKSPACE/pyproject.toml - - name: build Sphinx docs run: sphinx-build -b html $GITHUB_WORKSPACE/docs $GITHUB_WORKSPACE/_build