Skip to content

Commit 501be13

Browse files
committed
chore(ci): attempt gh-pages deployment via beta route
1 parent 4928305 commit 501be13

File tree

1 file changed

+44
-16
lines changed

1 file changed

+44
-16
lines changed

.github/workflows/reusable_publish_docs.yml

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
permissions:
2525
contents: write
2626
pages: write
27+
id-token: write
2728

2829
jobs:
2930
publish_docs:
@@ -63,21 +64,48 @@ jobs:
6364
run: |
6465
make release-docs VERSION="$VERSION" ALIAS="$ALIAS"
6566
poetry run mike set-default --push latest
66-
# Maintenance: Migrate to new gh-pages action
67-
- name: Release API docs
68-
uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935 # v3.9.0
69-
env:
70-
VERSION: ${{ inputs.version }}
67+
68+
- name: Setup Pages
69+
id: pages
70+
uses: actions/configure-pages@v2
71+
- name: Upload latest API docs
72+
uses: actions/upload-pages-artifact@v1
7173
with:
72-
github_token: ${{ secrets.GITHUB_TOKEN }}
73-
publish_dir: ./api
74-
keep_files: true
75-
destination_dir: ${{ env.VERSION }}/api
76-
- name: Release API docs to latest
77-
if: ${{ inputs.alias == 'latest' }}
78-
uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935 # v3.9.0
74+
path: ./api
75+
- name: Upload versioned API docs
76+
uses: actions/upload-pages-artifact@v1
7977
with:
80-
github_token: ${{ secrets.GITHUB_TOKEN }}
81-
publish_dir: ./api
82-
keep_files: true
83-
destination_dir: latest/api
78+
path: ${{ env.VERSION }}/api
79+
80+
# Deployment job
81+
deploy:
82+
concurrency:
83+
group: on-docs-deploy
84+
environment:
85+
name: github-pages
86+
url: ${{ steps.deployment.outputs.page_url }}
87+
runs-on: ubuntu-latest
88+
needs: publish_docs
89+
steps:
90+
- name: Deploy to GitHub Pages
91+
id: deployment
92+
uses: actions/deploy-pages@v1
93+
94+
# Maintenance: Migrate to new gh-pages action
95+
# - name: Release API docs
96+
# uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935 # v3.9.0
97+
# env:
98+
# VERSION: ${{ inputs.version }}
99+
# with:
100+
# github_token: ${{ secrets.GITHUB_TOKEN }}
101+
# publish_dir: ./api
102+
# keep_files: true
103+
# destination_dir: ${{ env.VERSION }}/api
104+
# - name: Release API docs to latest
105+
# if: ${{ inputs.alias == 'latest' }}
106+
# uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935 # v3.9.0
107+
# with:
108+
# github_token: ${{ secrets.GITHUB_TOKEN }}
109+
# publish_dir: ./api
110+
# keep_files: true
111+
# destination_dir: latest/api

0 commit comments

Comments
 (0)