Repository navigation
56 lines (46 loc) · 1.91 KB
/
Copy pathdocs.yml
File metadata and controls
56 lines (46 loc) · 1.91 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
55
56
name: Build docs
on:
release:
types: [published]
workflow_dispatch:
permissions: {}
jobs:
docs:
runs-on: ubuntu-latest
container: node@sha256:fdddfb3e688158251943d52eba361de991548f6814007acba4917ae6b512d6be # 24
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Get Package Version
id: package-version
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1
- run: yarn --frozen-lockfile
- run: yarn gendoc
- name: Deploy v${{ steps.package-version.outputs.current-version }}
# This step will copy over generated docs to gh-pages branch, commit and publish
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
publish_dir: ./.typedoc/
destination_dir: ./${{ steps.package-version.outputs.current-version }}
full_commit_message: Deploy ${{ steps.package-version.outputs.current-version }} to GitHub Pages
- name: Checkout gh-pages
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: gh-pages
persist-credentials: false
# update the index file
- env:
CURRENT_VERSION: ${{ steps.package-version.outputs.current-version }}
run: node insert-new-version.js "${CURRENT_VERSION}"
- name: Commit updated index
uses: github-actions-x/commit@722d56b8968bf00ced78407bbe2ead81062d8baa # v2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'gh-pages'
commit-message: Publish v${{ steps.package-version.outputs.current-version }}
files: index.html
name: GitHub Actions
email: actions@github.com