Skip to content

Commit

Permalink
feat: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jrandolf committed Jun 28, 2022
1 parent 7a22f95 commit 40c9f8b
Show file tree
Hide file tree
Showing 756 changed files with 14,338 additions and 7,242 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/documentation-ci.yml
@@ -0,0 +1,30 @@
name: Documentation CI

permissions: read-all

on:
pull_request:
branches:
- '**'

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
diff-docs:
name: Diff documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3.3.0
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Build
run: npm run docs
- name: Diff docs
run: $(git diff) || exit 1
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
pre-release:
name: Attach pre-release artifacts
if: "startsWith(github.event.head_commit.message, 'chore(main): release')"
runs-on: ubuntu-latest
permissions:
Expand All @@ -21,7 +22,6 @@ jobs:
- name: Build
run: |
node utils/generate_version_file.js
IS_RELEASE=1 npm run doc
- name: Commit
run: |
git config --global user.name 'release-please[bot]'
Expand Down
38 changes: 20 additions & 18 deletions .github/workflows/publish.yml
Expand Up @@ -6,7 +6,8 @@ on:
- v*

jobs:
publish:
npm-publish:
name: Publish to NPM
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -37,7 +38,8 @@ jobs:
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
npm publish
post-publish:
deploy-docs:
name: Deploy documentation
needs: publish
runs-on: ubuntu-latest
permissions:
Expand All @@ -48,23 +50,23 @@ jobs:
uses: actions/checkout@v3
with:
ref: main
- name: Install dependencies
run: npm install
- name: Build main docs
run: npm run doc
- name: Commit
- name: Generate docs
working-directory: ./website
run: npm run docs
- name: Version docs
working-directory: ./website
run: npm run docusaurus docs:version ${GITHUB_REF#refs/*/v}
- name: Commit to main
run: |
git config --global user.email "55107282+release-please[bot]@users.noreply.github.com"
git config --global user.name "release-please[bot]"
git commit -am "chore: unfreeze version on docs"
- name: Create PR
uses: peter-evans/create-pull-request@v4
git add .
git commit -m "chore: generate v${GITHUB_REF#refs/*/v} docs"
git push
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
token: ${{secrets.PR_PAT}}
committer: 'release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>'
author: 'release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>'
title: 'chore: unfreeze version on docs'
body: ''
labels: automated pr
branch: create-pull-request/unfreeze
delete-branch: true
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
user_name: release-please[bot]
user_email: 55107282+release-please[bot]@users.noreply.github.com
47 changes: 31 additions & 16 deletions .gitignore
@@ -1,19 +1,34 @@
.DS_Store
.vscode
/.dev_profile*
/.local-chromium/
/.local-firefox/
/test/output-*/
build/
# Dependencies
node_modules

# Production
build
lib

# Generated files
coverage
coverage/
doclint/
docs-api-json/
docs/api.html
lib/
node_modules/
package-lock.json
tsconfig.tsbuildinfo
puppeteer.api.json
puppeteer*.tgz
tsconfig.tsbuildinfo
yarn.lock
package-lock.json
yarn.lock
.docusaurus
.cache-loader
.local-chromium
.local-firefox
test/output-*/
.dev_profile*

# IDE Artifacts
.vscode

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
2 changes: 1 addition & 1 deletion .husky/pre-push
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run build:tsc && npm run lint:eslint && npm run doc && npm run lint:prettier && npm run test:pinned-deps
npm run build && npm run lint:eslint && npm run lint:prettier && npm run test:pinned-deps
4 changes: 3 additions & 1 deletion .prettierignore
Expand Up @@ -13,4 +13,6 @@ test/assets/
tsconfig.tsbuildinfo
vendor/
yarn.lock
puppeteer.api.json
puppeteer.api.json
website/
docs/

0 comments on commit 40c9f8b

Please sign in to comment.