Skip to content

Commit e04b975

Browse files
Page workflow action #29
1 parent ff65a13 commit e04b975

1 file changed

Lines changed: 25 additions & 21 deletions

File tree

.github/workflows/pages.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
1-
name: Publish TypeDoc to GitHub Pages
1+
name: 'Typedoc pages'
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
711

812
jobs:
9-
build-and-deploy:
13+
build:
1014
runs-on: ubuntu-latest
11-
1215
steps:
13-
- name: Checkout Repository
14-
uses: actions/checkout@v2
15-
16-
- name: Set up Node.js
17-
uses: actions/setup-node@v2
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-node@v3
18+
- run: npm install
19+
# Generate TypeDoc documentation
20+
- run: npm run typedoc
21+
# https://github.com/actions/upload-pages-artifact
22+
- uses: actions/upload-pages-artifact@v2
1823
with:
19-
node-version: '18'
20-
21-
- name: Install Dependencies
22-
run: npm install
23-
24-
- name: Generate TypeDoc Documentation
25-
run: npm run typedoc
26-
24+
path: ./docs
25+
deploy:
26+
runs-on: ubuntu-latest
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
needs: build
31+
steps:
2732
- name: Deploy to GitHub Pages
33+
id: deployment
34+
# https://github.com/actions/deploy-pages
2835
uses: actions/deploy-pages@v2
29-
with:
30-
branch: gh-pages # Pushes to the gh-pages branch
31-
folder: docs # Replace with the folder where TypeDoc outputs the files

0 commit comments

Comments
 (0)