Skip to content

micromark-extension-kbd-nested v0.6.0 #28

micromark-extension-kbd-nested v0.6.0

micromark-extension-kbd-nested v0.6.0 #28

Workflow file for this run

on:
release:
types: [published]
name: publish-to-npmjs
env:
PNPM_VERSION: "9.0.4"
NODE_VERSION: "18.17.0"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: "${{ env.PNPM_VERSION }}"
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: "${{ env.NODE_VERSION }}"
- name: Register package name
run: |
PACKAGE_NAME=`echo "${{ github.event.release.name }}" | cut -d ' ' -f 1`
echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_ENV
- name: Publish single module
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
# the `echo` below deliberately uses single quotes so that the
# token isn’t written to the file; instead, npm should replace
# it at runtime.
run: |
cd packages/$PACKAGE_NAME
pnpm install --frozen-lockfile --filter "$PACKAGE_NAME..."
pnpm run -r build --filter "$PACKAGE_NAME"
pnpm publish --no-git-checks --filter "$PACKAGE_NAME"
- name: Check out just docs
uses: actions/checkout@v4
with:
ref: "gh-pages"
sparse-checkout: "docs-json"
- name: Update documentation
run: |
pnpm install -r --frozen-lockfile
pushd packages/$PACKAGE_NAME
npx typedoc --json ../../docs-json --options typedoc.json --validation.invalidLink
popd
npx typedoc --entrypointStrategy merge "docs-json/*.json"
- name: Deploy docs to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}