Skip to content

Commit f86031e

Browse files
committed
Implement site deployment on release
1 parent 649aa24 commit f86031e

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
jobs:
1010
build:
11+
outputs:
12+
docs-version: ${{ steps.docs-version.outputs.version }}
1113
runs-on: ubuntu-latest
1214
permissions:
1315
contents: read
@@ -36,6 +38,11 @@ jobs:
3638
path: dist
3739
retention-days: 1
3840

41+
- name: Export version for site docs
42+
id: docs-version
43+
run: ./ci-scripts/docs-version.sh >> "$GITHUB_OUTPUT"
44+
45+
3946
publish:
4047
runs-on: ubuntu-latest
4148
needs: build
@@ -64,3 +71,9 @@ jobs:
6471
################################
6572
with:
6673
repository-url: https://test.pypi.org/legacy/
74+
75+
site:
76+
needs: build
77+
uses: ./.github/workflows/reusable-github-pages.yml
78+
with:
79+
site-version: "${{needs.build.outputs.docs-version.version}}"

ci-scripts/docs-version.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
VERSION=$(poetry version -s)
4+
SEMVER=( ${VERSION//./ } )
5+
echo "version=${SEMVER[0]}.${SEMVER[1]}"

0 commit comments

Comments
 (0)