Skip to content

Commit

Permalink
add docs gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
nichoth committed May 10, 2024
1 parent 2d8ff65 commit a40d6f3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: GitHub Pages deploy

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install
run: npm install
- name: Build
run: npm run build-docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"test:tape-run": "cat test/index.html | tape-run --input=html --static=test | tap-spec",
"build-cjs": "esbuild src/*.ts --format=cjs --tsconfig=tsconfig.build.json --keep-names --outdir=./dist --out-extension:.js=.cjs",
"build": "mkdir -p ./dist && rm -rf ./dist/* && npm run build-cjs && tsc --project tsconfig.build.json",
"build-docs": "typedoc ./src/index.ts",
"preversion": "npm run lint",
"changelog": "auto-changelog --template keepachangelog --breaking-pattern 'BREAKING CHANGE' && git add CHANGELOG.md && git commit -m 'changelog'",
"postversion": "npm run changelog && git push --follow-tags && npm publish",
Expand All @@ -30,6 +31,7 @@
"eslint-config-standard": "^17.1.0",
"tap-spec": "^5.0.0",
"tape-run": "^11.0.0",
"typedoc": "^0.25.13",
"typescript": "^5.2.2",
"xterm": "^5.3.0"
},
Expand Down

0 comments on commit a40d6f3

Please sign in to comment.