Skip to content

Commit c2a84e6

Browse files
authored
Initial configuration of docs generation (#3)
1 parent e3718e7 commit c2a84e6

File tree

6 files changed

+1190
-27
lines changed

6 files changed

+1190
-27
lines changed

.github/workflows/lint.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# @license Apache-2.0
2-
#
31
# Copyright 2024 8 Hobbies, LLC <hong@8hobbies.com>
42
#
53
# Licensed under the Apache License, Version 2.0(the "License");

.github/workflows/pages.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright 2024 8 Hobbies, LLC <hong@8hobbies.com>
2+
#
3+
# Licensed under the Apache License, Version 2.0(the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Build and Deploy Pages
16+
17+
on:
18+
push:
19+
branches: ["master"]
20+
pull_request:
21+
branches: ["master"]
22+
23+
jobs:
24+
build:
25+
name: Build Pages
26+
runs-on: ubuntu-22.04
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: 20.x
34+
cache: "npm"
35+
36+
- name: Install Dependencies
37+
run: |
38+
npm install
39+
40+
- name: Generate Docs
41+
run: |
42+
npm run doc
43+
44+
- name: Upload GitHub Pages Artifact
45+
uses: actions/upload-pages-artifact@v3.0.1
46+
with:
47+
path: docs
48+
49+
deploy:
50+
name: Deploy Pages
51+
if: github.ref == 'refs/heads/master'
52+
runs-on: ubuntu-22.04
53+
permissions:
54+
pages: write
55+
id-token: write
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
needs: build
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dist
1313
dist-ssr
1414
*.local
1515
*.tsbuildinfo
16+
/docs
1617

1718
# Editor directories and files
1819
.vscode/*

0 commit comments

Comments
 (0)