Skip to content

Commit a202366

Browse files
Merge pull request #30 from NxtLvLSoftware/dev-to-dist
Merge dev changes to dist
2 parents d6c0976 + 139d1c0 commit a202366

4 files changed

Lines changed: 37 additions & 17 deletions

File tree

.github/workflows/pages-publish.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ env:
1616
NODE_VERSION: 20
1717

1818
jobs:
19-
build-docs:
20-
name: Generate site
19+
wait-for-package-publish:
20+
name: Wait for package publish workflow success
2121
runs-on: ubuntu-latest
2222
timeout-minutes: 5
2323

@@ -30,6 +30,13 @@ jobs:
3030
repo-token: ${{ secrets.GITHUB_TOKEN }}
3131
wait-interval: 10
3232

33+
build-docs:
34+
name: Generate site
35+
needs: [wait-for-package-publish]
36+
runs-on: ubuntu-latest
37+
timeout-minutes: 5
38+
39+
steps:
3340
- uses: actions/checkout@v4
3441

3542
- name: Remove README.md index lines
@@ -48,10 +55,10 @@ jobs:
4855
key: ${{ runner.os }}}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('package.json') }}
4956

5057
- name: Install dependencies
51-
run: npm install
58+
run: npm run clean-install
5259

53-
- name: Build alpine-typescript
54-
run: npm run docs-ci
60+
- name: Build alpine-typescript docs
61+
run: npm run docs-dist
5562

5663
- name: Copy favicon to /docs-build
5764
run: |
@@ -64,18 +71,11 @@ jobs:
6471

6572
build-example:
6673
name: Generate example site
74+
needs: [wait-for-package-publish]
6775
runs-on: ubuntu-latest
6876
timeout-minutes: 5
6977

7078
steps:
71-
- name: Wait for publish success
72-
uses: lewagon/wait-on-check-action@v1.3.1
73-
with:
74-
ref: ${{ github.ref }}
75-
check-name: Publish to npm registry
76-
repo-token: ${{ secrets.GITHUB_TOKEN }}
77-
wait-interval: 10
78-
7979
- uses: actions/checkout@v3
8080
with:
8181
sparse-checkout: |
@@ -103,10 +103,10 @@ jobs:
103103
key: ${{ runner.os }}}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('package.json') }}
104104

105105
- name: Install dependencies
106-
run: npm install
106+
run: npm clean-install
107107

108108
- name: Build example project
109-
run: npm run build-ci
109+
run: npm run build-dist
110110

111111
- uses: actions/upload-artifact@v3
112112
with:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"build": "npm run clean && tsc --build tsconfig.json --inlineSourceMap",
3636
"dev": "npm run build -- --watch",
3737
"build-dist": "npm run build -- --inlineSourceMap --listEmittedFiles",
38-
"docs": "npx typedoc --plugin typedoc-plugin-extras --out docs-build --cacheBust src/index.ts",
39-
"docs-dist": "npm run docs -- --gitRevision dev",
38+
"docs": "npx typedoc",
39+
"docs-dist": "npm run docs -- --gitRevision dist",
4040
"setup-examples": "cd examples/package && npm run setup-dev && cd ../project && npm run setup-dev",
4141
"build-examples": "cd examples/package && npm run build && cd ../project && npm run build"
4242
},

tsconfig.docs.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"extends": "./tsconfig.json",
4+
"include": [
5+
"types/**/*.d.ts"
6+
],
7+
"compilerOptions": {
8+
"noEmit": true
9+
}
10+
}

typedoc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
{
2+
"entryPoints": [
3+
"types/index.d.ts"
4+
],
5+
"tsconfig": "tsconfig.docs.json",
6+
"emit": "docs",
7+
"out": "./docs-build",
8+
"cacheBust": true,
9+
"plugin": [
10+
"typedoc-plugin-extras"
11+
],
212
"favicon": "https://nxtlvlsoftware.github.io/alpine-typescript/favicon.ico",
313
"footerTypedocVersion": true,
414
"footerDate": true,

0 commit comments

Comments
 (0)