remark-kbd-nested v0.5.2 #40
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
on: | |
release: | |
types: [published] | |
name: publish-to-npmjs | |
env: | |
PNPM_VERSION: "9.0.4" | |
NODE_VERSION: "18.17.0" | |
TYPEDOC_VERSION: "0.25.13" | |
jobs: | |
publish: | |
permissions: | |
contents: write | |
id-token: write | |
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 }}" | |
# Forces the creation of an .npmrc that reads `NODE_AUTH_TOKEN` | |
registry-url: "https://registry.npmjs.org" | |
- 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 | |
run: | | |
pushd packages/$PACKAGE_NAME | |
pnpm install --frozen-lockfile --filter "$PACKAGE_NAME..." | |
# `publish` calls `npm run build` because of the `prepublish` hook. | |
pnpm publish --filter "$PACKAGE_NAME" --no-git-checks | |
popd | |
- name: Check out just docs | |
uses: actions/checkout@v4 | |
with: | |
path: "gh-pages" | |
ref: "gh-pages" | |
sparse-checkout: "docs-json" | |
- name: Update documentation | |
run: | | |
DOCS_JSON_PATH=gh-pages/docs-json | |
pnpm install -r --frozen-lockfile | |
mkdir -p $DOCS_JSON_PATH | |
pushd packages/$PACKAGE_NAME | |
npx typedoc@$TYPEDOC_VERSION --json ../../$DOCS_JSON_PATH/$PACKAGE_NAME.json --options typedoc.json --validation.invalidLink | |
popd | |
npx typedoc@$TYPEDOC_VERSION --entryPointStrategy merge "$DOCS_JSON_PATH/*.json" | |
mv $DOCS_JSON_PATH docs | |
- name: Deploy docs to GitHub Pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |