Skip to content

Commit

Permalink
remove renaming for docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Dec 22, 2024
1 parent 2ceded5 commit 77b1a98
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,6 +40,7 @@ jobs:
- name: Install dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install setuptools_scm[toml]
- name: Install package
run: |
Expand All @@ -57,25 +60,15 @@ 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: Run tmate
uses: mxschmitt/action-tmate@v2

- name: build Sphinx docs
run: sphinx-build -b html $GITHUB_WORKSPACE/docs $GITHUB_WORKSPACE/_build

- name: Run tmate
uses: mxschmitt/action-tmate@v2

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 77b1a98

Please sign in to comment.