Skip to content

Commit 79c6194

Browse files
fix github docs workflow (#1016)
* fix github workflow * get version from package
1 parent 5084b61 commit 79c6194

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

.github/workflows/docs.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@ on:
1515
workflow_dispatch:
1616

1717
permissions:
18-
contents: read
19-
pages: write
20-
id-token: write
18+
contents: write # Needed to push to gh-pages branch
2119

2220
concurrency:
2321
group: "pages"
2422
cancel-in-progress: false
2523

2624
jobs:
27-
build:
25+
deploy:
2826
runs-on: ubuntu-latest
2927
steps:
3028
- name: Checkout repository
@@ -63,23 +61,11 @@ jobs:
6361
git config user.email "github-actions[bot]@users.noreply.github.com"
6462
git fetch --depth=1 origin gh-pages || true
6563
64+
- name: Get version from package.json
65+
id: package-version
66+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
67+
6668
- name: Deploy documentation with mike
6769
run: |
68-
mike deploy --push --update-aliases 4.5 latest
70+
mike deploy --push --update-aliases ${{ steps.package-version.outputs.version }} latest
6971
mike set-default --push latest
70-
71-
- name: Upload artifact
72-
uses: actions/upload-pages-artifact@v3
73-
with:
74-
path: ./site
75-
76-
deploy:
77-
environment:
78-
name: github-pages
79-
url: ${{ steps.deployment.outputs.page_url }}
80-
runs-on: ubuntu-latest
81-
needs: build
82-
steps:
83-
- name: Deploy to GitHub Pages
84-
id: deployment
85-
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)