Skip to content

Commit

Permalink
Merge pull request #30 from NxtLvLSoftware/dev-to-dist
Browse files Browse the repository at this point in the history
Merge dev changes to dist
  • Loading branch information
JackNoordhuis authored Sep 25, 2023
2 parents d6c0976 + 139d1c0 commit a202366
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 17 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/pages-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ env:
NODE_VERSION: 20

jobs:
build-docs:
name: Generate site
wait-for-package-publish:
name: Wait for package publish workflow success
runs-on: ubuntu-latest
timeout-minutes: 5

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

build-docs:
name: Generate site
needs: [wait-for-package-publish]
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: npm install
run: npm run clean-install

- name: Build alpine-typescript
run: npm run docs-ci
- name: Build alpine-typescript docs
run: npm run docs-dist

- name: Copy favicon to /docs-build
run: |
Expand All @@ -64,18 +71,11 @@ jobs:

build-example:
name: Generate example site
needs: [wait-for-package-publish]
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Wait for publish success
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: Publish to npm registry
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10

- uses: actions/checkout@v3
with:
sparse-checkout: |
Expand Down Expand Up @@ -103,10 +103,10 @@ jobs:
key: ${{ runner.os }}}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('package.json') }}

- name: Install dependencies
run: npm install
run: npm clean-install

- name: Build example project
run: npm run build-ci
run: npm run build-dist

- uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"build": "npm run clean && tsc --build tsconfig.json --inlineSourceMap",
"dev": "npm run build -- --watch",
"build-dist": "npm run build -- --inlineSourceMap --listEmittedFiles",
"docs": "npx typedoc --plugin typedoc-plugin-extras --out docs-build --cacheBust src/index.ts",
"docs-dist": "npm run docs -- --gitRevision dev",
"docs": "npx typedoc",
"docs-dist": "npm run docs -- --gitRevision dist",
"setup-examples": "cd examples/package && npm run setup-dev && cd ../project && npm run setup-dev",
"build-examples": "cd examples/package && npm run build && cd ../project && npm run build"
},
Expand Down
10 changes: 10 additions & 0 deletions tsconfig.docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.json",
"include": [
"types/**/*.d.ts"
],
"compilerOptions": {
"noEmit": true
}
}
10 changes: 10 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"entryPoints": [
"types/index.d.ts"
],
"tsconfig": "tsconfig.docs.json",
"emit": "docs",
"out": "./docs-build",
"cacheBust": true,
"plugin": [
"typedoc-plugin-extras"
],
"favicon": "https://nxtlvlsoftware.github.io/alpine-typescript/favicon.ico",
"footerTypedocVersion": true,
"footerDate": true,
Expand Down

0 comments on commit a202366

Please sign in to comment.