Skip to content

Commit ac41792

Browse files
authored
CI improvements (docs build gets version, no PAT token required for submodule anymore) (#29)
* feat: set uv version in docs pipeline to tag * fix: no PAT token for submodule anymore
1 parent cf959c6 commit ac41792

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,7 @@ jobs:
9191
- uses: actions/checkout@v5
9292

9393
- name: Initialize submodules
94-
env:
95-
GIT_ASKPASS: /bin/echo
96-
GH_PAT: ${{ secrets.GH_PAT }}
97-
run: |
98-
git config --global url."https://${GH_PAT}@github.com/".insteadOf "https://github.com/"
99-
git submodule update --init --recursive
94+
run: git submodule update --init --recursive
10095

10196
- name: Install uv
10297
uses: astral-sh/setup-uv@v6

.github/workflows/docs.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,17 @@ jobs:
5151
with:
5252
enable-cache: true
5353

54-
- name: Set up Python
55-
run: uv python install
54+
- name: Set version from tag
55+
run: |
56+
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
57+
TAG_VERSION=${GITHUB_REF#refs/tags/}
58+
# Remove 'v' prefix if present
59+
VERSION=${TAG_VERSION#v}
60+
echo "Setting version to: $VERSION"
61+
uv version "$VERSION"
62+
else
63+
echo "Not building from a tag, using default version"
64+
fi
5665
5766
- name: Install dependencies
5867
run: uv sync --locked --group docs

0 commit comments

Comments
 (0)