Skip to content

Commit 66be87c

Browse files
change from gh-pages deploy to workflow deployment (#1017)
1 parent 79c6194 commit 66be87c

1 file changed

Lines changed: 26 additions & 11 deletions

File tree

.github/workflows/docs.yml

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

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

2022
concurrency:
2123
group: "pages"
2224
cancel-in-progress: false
2325

2426
jobs:
25-
deploy:
27+
build:
2628
runs-on: ubuntu-latest
2729
steps:
2830
- name: Checkout repository
@@ -55,17 +57,30 @@ jobs:
5557
- name: Install MkDocs dependencies
5658
run: pip install -r requirements-docs.txt
5759

58-
- name: Configure Git for MkDocs
59-
run: |
60-
git config user.name "github-actions[bot]"
61-
git config user.email "github-actions[bot]@users.noreply.github.com"
62-
git fetch --depth=1 origin gh-pages || true
63-
6460
- name: Get version from package.json
6561
id: package-version
6662
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
6763

68-
- name: Deploy documentation with mike
64+
- name: Build documentation with mike
6965
run: |
70-
mike deploy --push --update-aliases ${{ steps.package-version.outputs.version }} latest
71-
mike set-default --push latest
66+
mike deploy --no-redirect ${{ steps.package-version.outputs.version }} latest
67+
mike set-default latest
68+
69+
- name: Setup Pages
70+
uses: actions/configure-pages@v4
71+
72+
- name: Upload artifact
73+
uses: actions/upload-pages-artifact@v3
74+
with:
75+
path: ./site
76+
77+
deploy:
78+
environment:
79+
name: github-pages
80+
url: ${{ steps.deployment.outputs.page_url }}
81+
runs-on: ubuntu-latest
82+
needs: build
83+
steps:
84+
- name: Deploy to GitHub Pages
85+
id: deployment
86+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)