Skip to content

Commit 5d5dda4

Browse files
committed
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 241e2c4 commit 5d5dda4

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
@@ -84,12 +84,7 @@ jobs:
8484
- uses: actions/checkout@v5
8585

8686
- name: Initialize submodules
87-
env:
88-
GIT_ASKPASS: /bin/echo
89-
GH_PAT: ${{ secrets.GH_PAT }}
90-
run: |
91-
git config --global url."https://${GH_PAT}@github.com/".insteadOf "https://github.com/"
92-
git submodule update --init --recursive
87+
run: git submodule update --init --recursive
9388

9489
- name: Install uv
9590
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)