docs: add note/tip titles and update nx commands to verb-noun format … #405
This file contains hidden or 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 | |
| concurrency: | |
| group: 'ci' | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| CI: 'true' | |
| NX_DAEMON: 'true' | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| statuses: write | |
| checks: write | |
| contents: write | |
| actions: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: codebuild-nx-plugin-for-aws-runner-${{ github.run_id }}-${{ github.run_attempt }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/init-monorepo | |
| with: | |
| aws-docker-login-role-arn: ${{ secrets.AWS_DOCKER_LOGIN_ROLE_ARN }} | |
| - name: Build | |
| run: pnpm nx run-many --target build --all --output-style=stream | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Check for mutations | |
| run: git diff --ignore-space-at-eol --exit-code -- ':!**/LICENSE-THIRD-PARTY' | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: build-artifact | |
| path: dist | |
| - name: Upload docs artifact | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: docs-artifact | |
| path: docs/dist | |
| smoke_tests: | |
| name: Smoke Tests - ${{matrix.smoke_test}} | |
| runs-on: codebuild-nx-plugin-for-aws-runner-${{ github.run_id }}-${{ github.run_attempt }} | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| smoke_test: | |
| - npm | |
| - yarn | |
| - pnpm | |
| - bun | |
| - dungeon-adventure | |
| - terraform | |
| - trpc-api | |
| - fast-api | |
| - react-website | |
| - cdk-deploy | |
| - license-sync | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: build-artifact | |
| path: dist | |
| - uses: ./.github/actions/init-monorepo | |
| with: | |
| aws-docker-login-role-arn: ${{ secrets.AWS_DOCKER_LOGIN_ROLE_ARN }} | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| role-to-assume: ${{ secrets.DEPLOY_INTEG_TESTS_ROLE_ARN }} | |
| aws-region: us-west-2 | |
| - name: Smoke Test - ${{ matrix.smoke_test }} | |
| run: pnpm nx run @aws/nx-plugin-e2e:test -t "smoke test - ${{ matrix.smoke_test }}" | |
| release: | |
| name: Release | |
| needs: [build, smoke_tests] | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| latest_commit: ${{ steps.git_remote.outputs.latest_commit }} | |
| skip_release: ${{ steps.should_skip_release.outputs.skip_release }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: build-artifact | |
| path: dist | |
| - uses: ./.github/actions/init-monorepo | |
| with: | |
| aws-docker-login-role-arn: ${{ secrets.AWS_DOCKER_LOGIN_ROLE_ARN }} | |
| - name: Check for new commits | |
| id: git_remote | |
| run: echo "latest_commit=$(git ls-remote origin -h ${{ github.ref }} | cut -f1)" >> $GITHUB_OUTPUT | |
| - name: Should skip release | |
| id: should_skip_release | |
| run: echo "skip_release=$(git log $(git describe --tags --abbrev=0)..HEAD --oneline | grep -qE 'feat\(?.*\)?:|fix\(?.*\)?:|revert\(?.*\)?:|perf\(?.*\)?:' && echo false || echo true)" >> $GITHUB_OUTPUT | |
| - name: Release | |
| if: ${{ steps.should_skip_release.outputs.skip_release != 'true' && github.event_name == 'push' && steps.git_remote.outputs.latest_commit == github.sha }} | |
| env: | |
| # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_DIST_TAG: latest | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
| HUSKY: '0' | |
| run: | | |
| pnpm nx release --yes | |
| deploy_docs: | |
| name: Deploy Docs | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' && needs.release.outputs.latest_commit == github.sha }} | |
| needs: [release] | |
| steps: | |
| - name: Download docs artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: docs-artifact | |
| path: docs-site | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: 'docs-site' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |