Skip to content

Commit 9c5712c

Browse files
committed
chore: set up github actions ci
1 parent 49ebd83 commit 9c5712c

File tree

5 files changed

+249
-31
lines changed

5 files changed

+249
-31
lines changed

.github/workflows/ci.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
permissions:
12+
actions: read
13+
contents: read
14+
15+
jobs:
16+
main:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: "npm"
27+
28+
- run: npm ci --legacy-peer-deps
29+
- uses: nrwl/nx-set-shas@v4
30+
31+
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
32+
- run: npx nx affected -t format:check lint build coverage

.github/workflows/docs.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- github-actions
8+
9+
jobs:
10+
build:
11+
name: Build Docusaurus
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
cache: npm
21+
22+
- name: Install dependencies
23+
run: npm ci --legacy-peer-deps
24+
- name: Build website
25+
run: npx nx run @stricli/docs:build-docs
26+
27+
- name: Upload Build Artifact
28+
uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: docs/build
31+
32+
deploy:
33+
name: Deploy to GitHub Pages
34+
needs: build
35+
36+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
37+
permissions:
38+
pages: write # to deploy to Pages
39+
id-token: write # to verify the deployment originates from an appropriate source
40+
41+
# Deploy to the github-pages environment
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

docs/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
"@docusaurus/types": "3.5.2",
3939
"@stricli/core": "^0.0.1",
4040
"docusaurus-plugin-typedoc": "^1.0.5",
41-
"typedoc": "^0.26.7"
41+
"sass": "^1.79.4",
42+
"typedoc": "^0.26.7",
43+
"typedoc-plugin-markdown": "^4.2.8"
4244
},
4345
"browserslist": {
4446
"production": [

nx.json

+3
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,8 @@
5050
"git": {
5151
"commitMessage": "chore(release): {version}"
5252
}
53+
},
54+
"namedInputs": {
55+
"sharedGlobals": ["{workspaceRoot}/.github/workflows/ci.yml"]
5356
}
5457
}

0 commit comments

Comments
 (0)