Skip to content

Commit 3d123d4

Browse files
feat(docs): Add automated building and deployment of typedocs
1 parent 39172e0 commit 3d123d4

639 files changed

Lines changed: 115 additions & 218896 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Upload GitHub Pages artifact"
2+
description: "A composite action that prepares your static assets to be deployed to GitHub Pages"
3+
author: "GitHub"
4+
inputs:
5+
name:
6+
description: 'Artifact name'
7+
required: false
8+
default: 'github-pages'
9+
path:
10+
description: "Path of the directory containing the static assets."
11+
required: true
12+
default: "/docs"
13+
retention-days:
14+
description: "Duration after which artifact will expire in days."
15+
required: false
16+
default: "1"
17+
runs:
18+
using: composite
19+
steps:
20+
- name: Archive artifact
21+
shell: sh
22+
if: runner.os == 'Linux'
23+
run: |
24+
chmod -c -R +rX "$INPUT_PATH" | while read line; do
25+
echo "::warning title=Invalid file permissions automatically fixed::$line"
26+
done
27+
tar \
28+
--dereference --hard-dereference \
29+
--directory "$INPUT_PATH" \
30+
-cvf "$RUNNER_TEMP/artifact.tar" \
31+
--exclude=.git \
32+
--exclude=.github \
33+
.
34+
env:
35+
INPUT_PATH: ${{ inputs.path }}
36+
37+
- name: Upload artifact
38+
uses: actions/upload-artifact@v3
39+
with:
40+
name: ${{ inputs.name }}
41+
path: ${{ runner.temp }}/artifact.tar
42+
retention-days: ${{ inputs.retention-days }}
43+
if-no-files-found: error

.github/workflows/release.yml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,76 @@ on:
66
jobs:
77
call-build-lint-test-workflow:
88
uses: ./.github/workflows/build-lint-test.yml
9-
deploy:
9+
build-typedocs:
10+
runs-on: ubuntu-latest
11+
needs: [call-build-lint-test-workflow]
12+
env:
13+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: '14'
19+
- uses: actions/cache@v2
20+
id: yarn-cache
21+
name: Cache npm deps
22+
with:
23+
path: |
24+
node_modules
25+
**/node_modules
26+
~/.cache/Cypress
27+
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
28+
- run: yarn install --frozen-lockfile
29+
if: steps.yarn-cache.outputs.cache-hit != 'true'
30+
- uses: actions/cache@v2
31+
id: dist
32+
name: Cache dist
33+
with:
34+
path: |
35+
packages/*/dist
36+
packages/react-styles/css
37+
key: ${{ runner.os }}-dist-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock', 'package.json', 'packages/*/*', '!packages/*/dist', '!packages/*/node_modules') }}
38+
- name: Build dist
39+
run: yarn build
40+
if: steps.dist.outputs.cache-hit != 'true'
41+
- name: Build typedocs
42+
run: yarn build:typedocs
43+
- name: Archive artifact
44+
shell: sh
45+
run: |
46+
chmod -c -R +rX "$INPUT_PATH" | while read line; do
47+
echo "::warning title=Invalid file permissions automatically fixed::$line"
48+
done
49+
tar \
50+
--dereference --hard-dereference \
51+
--directory "$INPUT_PATH" \
52+
-cvf "$RUNNER_TEMP/artifact.tar" \
53+
--exclude=.git \
54+
--exclude=.github \
55+
.
56+
env:
57+
INPUT_PATH: docs
58+
- name: Upload artifact
59+
uses: actions/upload-artifact@v3
60+
with:
61+
name: github-pages
62+
path: ${{ runner.temp }}/artifact.tar
63+
retention-days: 1
64+
if-no-files-found: error
65+
deploy-typedocs:
66+
runs-on: ubuntu-latest
67+
needs: [call-build-lint-test-workflow, build-typedocs]
68+
permissions:
69+
pages: write
70+
id-token: write
71+
environment:
72+
name: github-pages
73+
url: ${{ steps.deployment.outputs.page_url }}
74+
steps:
75+
- name: Deploy to GitHub Pages
76+
id: deployment
77+
uses: actions/deploy-pages@v1
78+
deploy-package:
1079
runs-on: ubuntu-latest
1180
needs: [call-build-lint-test-workflow]
1281
env:

docs/.nojekyll

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/assets/highlight.css

Lines changed: 0 additions & 106 deletions
This file was deleted.

docs/assets/main.js

Lines changed: 0 additions & 58 deletions
This file was deleted.

docs/assets/search.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)