-
Notifications
You must be signed in to change notification settings - Fork 22
54 lines (43 loc) · 1.24 KB
/
docs.yaml
File metadata and controls
54 lines (43 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Docs
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
permissions: # required for GitHub Pages
contents: read
pages: write
id-token: write
jobs:
js:
name: TypeDoc for modal-js
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
with:
node-version: "22"
- run: npm ci
working-directory: ./modal-js
- run: npm run docs
working-directory: ./modal-js
- name: Upload docs artifact
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
path: ./modal-js/docs
deploy:
name: Deploy to GitHub Pages
needs: js
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
environment:
name: github-pages # creates/updates the Pages env
url: ${{ steps.deploy.outputs.page_url }}
steps:
- id: deploy
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5