chore(deps): update dependency cspell to v8.16.0 #368
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: CI | |
on: | |
push: | |
branches: [main, "renovate/**"] | |
pull_request: | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
# Adapted from https://github.com/nrwl/ci/blob/v0.14.0/.github/workflows/nx-cloud-main.yml | |
env: | |
NX_BRANCH: ${{ github.event.number || github.ref_name }} | |
jobs: | |
initialize: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
id: nvm | |
outputs: | |
node-version: ${{ steps.nvm.outputs.nvmrc }} | |
pull-request: | |
if: github.event_name == 'pull_request' || github.ref != 'refs/heads/main' | |
needs: [initialize] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
if: github.event_name == 'pull_request' | |
with: | |
fetch-depth: 0 | |
# GitHub checks PRs out based on the merge commit; we want the branch HEAD. | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/checkout@v4 | |
if: github.event_name != 'pull_request' | |
with: | |
fetch-depth: 0 | |
- run: git fetch origin main:main | |
- uses: ./.github/actions/setup-node | |
with: | |
node-version: ${{ needs.initialize.outputs.node-version }} | |
- run: npm run ci:install | |
- run: npm run ci:check | |
# Don't use the read-write NX_CLOUD_ACCESS_TOKEN when not on `main`, see https://nx.dev/ci/concepts/cache-security#use-a-readwrite-token-in-ci | |
- run: npx nx affected --configuration ci --parallel 3 --targets build,lint,test | |
main: | |
if: github.ref == 'refs/heads/main' | |
needs: [initialize] | |
permissions: | |
actions: read | |
contents: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- id: token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
owner: ${{ github.repository_owner }} | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.token.outputs.token }} | |
- uses: ./.github/actions/setup-node | |
with: | |
node-version: ${{ needs.initialize.outputs.node-version }} | |
- run: npm run ci:install | |
- run: npm run ci:check | |
# Skip the cache and use the read-write NX_CLOUD_ACCESS_TOKEN on `main`, see https://nx.dev/ci/concepts/cache-security#skip-the-cache-when-creating-a-deployment-artifact | |
- run: npx nx affected --configuration ci --parallel 3 --skip-nx-cache --target build | |
env: | |
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
- run: | | |
git config user.name "GitHub Bot" | |
git config user.email "[email protected]" | |
- env: | |
GH_TOKEN: ${{ steps.token.outputs.token }} | |
# Versions package.json files at project roots | |
run: npx nx release --skip-publish | |
# Run a build so package.json files in dist directories pick up new versions | |
- run: npx nx run-many --target=build | |
- env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx nx release publish | |
- run: npm run docs | |
- uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: docs | |
timeout-minutes: 10 |