Update JSdocs (WIP) #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Build and Deploy Example to GitHub-Pages | |
on: [ push ] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup stuff | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Enable corepack | |
run: corepack enable | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
cache: 'yarn' | |
# Check and build project | |
- run: yarn install | |
- run: yarn check | |
- run: yarn build | |
- run: yarn test | |
- name: Store dist folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
if-no-files-found: error | |
retention-days: 1 | |
overwrite: false | |
Example: | |
runs-on: ubuntu-latest | |
needs: Build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Enable corepack | |
run: corepack enable | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
cache: 'yarn' | |
- name: Download dist folder | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Generate documentation for example | |
run: yarn workspace example generate:ci | |
- name: Upload generated documentation to github pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "./example/out" | |
- uses: actions/deploy-pages@v4 | |
Publish: | |
runs-on: ubuntu-latest | |
needs: Build | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Enable corepack | |
run: corepack enable | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
cache: 'yarn' | |
- name: Download dist folder | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Publish | |
run: yarn npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |