Skip to content

Commit 9370129

Browse files
wphillipmoorewphillipmoore-claude
andauthored
refactor(docs): use shared docs-deploy composite action (#329)
Co-authored-by: wphillipmoore-claude <255925739+wphillipmoore-claude@users.noreply.github.com>
1 parent f1f9790 commit 9370129

1 file changed

Lines changed: 5 additions & 30 deletions

File tree

.github/workflows/docs.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ jobs:
2424
with:
2525
fetch-depth: 0
2626

27-
- name: Checkout mq-rest-admin-common
28-
uses: actions/checkout@v4
29-
with:
30-
repository: wphillipmoore/mq-rest-admin-common
31-
ref: develop
32-
path: .mq-rest-admin-common
33-
3427
- name: Set up Python
3528
uses: wphillipmoore/standard-actions/actions/python/setup@develop
3629
with:
@@ -40,27 +33,9 @@ jobs:
4033
- name: Install dependencies
4134
run: uv sync --frozen --group docs
4235

43-
- name: Configure git identity
44-
run: |
45-
git config user.name "github-actions[bot]"
46-
git config user.email "github-actions[bot]@users.noreply.github.com"
47-
48-
- name: Determine version
49-
id: version
50-
run: |
51-
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
52-
VERSION=$(uv run python -c "from importlib.metadata import version; v=version('pymqrest'); print('.'.join(v.split('.')[:2]))")
53-
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
54-
echo "alias=latest" >> "$GITHUB_OUTPUT"
55-
else
56-
echo "version=dev" >> "$GITHUB_OUTPUT"
57-
echo "alias=" >> "$GITHUB_OUTPUT"
58-
fi
59-
6036
- name: Deploy docs
61-
run: |
62-
if [ -n "${{ steps.version.outputs.alias }}" ]; then
63-
uv run mike deploy -F docs/site/mkdocs.yml --push --update-aliases ${{ steps.version.outputs.version }} ${{ steps.version.outputs.alias }}
64-
else
65-
uv run mike deploy -F docs/site/mkdocs.yml --push ${{ steps.version.outputs.version }}
66-
fi
37+
uses: wphillipmoore/standard-actions/actions/docs-deploy@develop
38+
with:
39+
version-command: uv run python -c "from importlib.metadata import version; v=version('pymqrest'); print('.'.join(v.split('.')[:2]))"
40+
mike-command: uv run mike
41+
checkout-common: "true"

0 commit comments

Comments
 (0)