Skip to content

Commit ed1a14e

Browse files
committed
chore: deprecate gh-pages in favor of pages action
1 parent 0a0f68f commit ed1a14e

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,33 @@ jobs:
5151
git config --global user.name "Github Actions"
5252
git config --global user.email "[email protected]"
5353
npm run semantic-release
54+
deploy_docs:
55+
if: github.ref == 'refs/heads/master'
56+
permissions:
57+
pages: write
58+
id-token: write
59+
environment:
60+
name: github-pages
61+
url: ${{ steps.deployment.outputs.page_url }}
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v2
66+
with:
67+
fetch-depth: 1
68+
- name: Setup node
69+
uses: actions/setup-node@v1
70+
with:
71+
node-version: 22
72+
- name: Install dependencies
73+
run: npm ci
5474
- name: Build API docs
55-
if: github.ref == 'refs/heads/master'
5675
run: npm run doc:generate-api
57-
- name: Publish docs
58-
if: github.ref == 'refs/heads/master'
59-
env:
60-
GIT_PUBLISH_URL: https://${{ secrets.GH_PUBLISH_CREDS }}@github.com/Kitware/vtk-js.git
61-
run: npm run doc:publish
76+
- name: Build docs
77+
run: npm run doc:minified
78+
- name: Upload docs as a Pages artifact
79+
uses: actions/upload-pages-artifact@v3
80+
with:
81+
path: ./Documentation/build-tmp/public/
82+
- name: Deploy docs
83+
uses: actions/deploy-pages@v4

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
"lint": "eslint Sources Examples",
144144
"doc": "kw-doc -c ./Documentation/config.js",
145145
"doc:www": "npm t -- --single-run && kw-doc -c ./Documentation/config.js -s",
146-
"doc:publish": "kw-doc -c ./Documentation/config.js -mp",
146+
"doc:minified": "kw-doc -c ./Documentation/config.js -m",
147147
"doc:generate-api": "node ./Documentation/generate-api-docs.js",
148148
"example": "node ./Utilities/ExampleRunner/example-runner-cli.js -c ./Documentation/config.js",
149149
"example:https": "node ./Utilities/ExampleRunner/example-runner-cli.js --server-type https -c ./Documentation/config.js",

0 commit comments

Comments
 (0)