Skip to content

Commit

Permalink
Merge branch 'main' into tylerjdev/behaviors-bump
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerJDev committed Jan 13, 2025
2 parents f36ecde + 829e4f7 commit fa3427d
Show file tree
Hide file tree
Showing 27 changed files with 1,096 additions and 1,991 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ updates:
labels:
- 'dependencies'
- 'skip changeset'
groups:
storybook:
patterns:
- '@storybook/*'
- 'storybook'

- package-ecosystem: 'github-actions'
directory: '/'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ jobs:
path: playwright-report
- name: check vrt-runner job status
if: ${{ needs.vrt-runner.result == 'failure' }}
continue-on-error: true
run: exit 1

vrt-runner-all-flags:
Expand Down Expand Up @@ -246,6 +247,7 @@ jobs:
path: playwright-report
- name: check vrt-runner-all-flags job status
if: ${{ needs.vrt-runner-all-flags.result == 'failure' }}
continue-on-error: true
run: exit 1

aat-runner:
Expand Down Expand Up @@ -318,6 +320,7 @@ jobs:
path: playwright-report
- name: Check aat-runner job status
if: ${{ needs.aat-runner.result == 'failure' }}
continue-on-error: true
run: exit 1

aat-runner-all-flags:
Expand Down Expand Up @@ -394,6 +397,7 @@ jobs:
path: playwright-report
- name: Check aat-runner-all-flags job status
if: ${{ needs.aat-runner-all-flags.result == 'failure' }}
continue-on-error: true
run: exit 1

build-components-json:
Expand Down
32 changes: 1 addition & 31 deletions .github/workflows/deploy_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
build:
if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }}
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -45,34 +46,3 @@ jobs:
uses: actions/deploy-pages@v4
with:
preview: true

deploy-storybook:
name: Preview Storybook
if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }}
needs: deploy-preview
permissions:
deployments: write
runs-on: ubuntu-latest
steps:
- uses: chrnorm/[email protected]
name: Create GitHub deployment for storybook
id: storybook
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: storybook-preview-${{ github.event.number }}
environment_url: '${{ needs.deploy-preview.outputs.deployment_url }}/storybook'
- name: Update storybook deployment status (success)
if: success()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}/storybook'
state: 'success'
deployment-id: ${{ steps.storybook.outputs.deployment_id }}
- name: Update storybook deployment status (failure)
if: failure()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
state: 'failure'
deployment-id: ${{ steps.storybook.outputs.deployment_id }}
238 changes: 238 additions & 0 deletions .github/workflows/deploy_preview_with_reports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
name: Deploy Preview (with VRT/AAT reports)
on:
workflow_run:
workflows: [CI]
types:
- completed

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
if: ${{ always() && github.event.workflow_run.head_repository.full_name == 'primer/react' }}
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build docs preview
run: npm run build:docs:preview_with_reports
- name: Download VRT reports (All flags enabled)
uses: actions/download-artifact@v4
with:
name: vrt-all-flags
path: docs/public/vrt-all-flags
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.workflow_run.head_repository.full_name }}
run-id: ${{ github.event.workflow_run.id }}
- name: Download VRT reports (No flags enabled)
uses: actions/download-artifact@v4
with:
name: vrt-no-flag
path: docs/public/vrt-no-flag
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.workflow_run.head_repository.full_name }}
run-id: ${{ github.event.workflow_run.id }}
- name: Download AAT reports (All flags enabled)
uses: actions/download-artifact@v4
with:
name: axe-all-flags
path: docs/public/aat-all-flags
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.workflow_run.head_repository.full_name }}
run-id: ${{ github.event.workflow_run.id }}
- name: Download AAT reports (No flags enabled)
uses: actions/download-artifact@v4
with:
name: axe
path: docs/public/aat-no-flag
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.workflow_run.head_repository.full_name }}
run-id: ${{ github.event.workflow_run.id }}
- uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: docs/public

deploy-preview:
if: ${{ github.event.workflow_run.head_repository.full_name == 'primer/react' }}
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
outputs:
deployment_url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
preview: true

deploy-storybook:
name: Preview Storybook
if: ${{ github.event.workflow_run.head_repository.full_name == 'primer/react' }}
needs: deploy-preview
permissions:
deployments: write
runs-on: ubuntu-latest
steps:
- uses: chrnorm/[email protected]
name: Create GitHub deployment for storybook
id: storybook
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: storybook-preview-${{ github.event.workflow_run.event.number }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}storybook'
- name: Update storybook deployment status (success)
if: success()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}storybook'
state: 'success'
deployment-id: ${{ steps.storybook.outputs.deployment_id }}
- name: Update storybook deployment status (failure)
if: failure()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
state: 'failure'
deployment-id: ${{ steps.storybook.outputs.deployment_id }}

deploy-vrt-no-flag:
name: VRT (No flags enabled)
if: ${{ github.event.workflow_run.head_repository.full_name == 'primer/react' }}
needs: [deploy-preview]
permissions:
deployments: write
runs-on: ubuntu-latest
steps:
- uses: chrnorm/[email protected]
name: Create GitHub deployment for vrt-no-flag
id: vrt-no-flag
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: vrt-no-flag-${{ github.event.workflow_run.event.number }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag'
- name: Update vrt-no-flag deployment status (success)
if: success()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag'
state: 'success'
deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }}
- name: Update vrt-no-flag deployment status (failure)
if: failure()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
state: 'failure'
deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }}

deploy-vrt-all-flags:
name: VRT (All flags enabled)
if: ${{ github.event.workflow_run.head_repository.full_name == 'primer/react' }}
needs: deploy-preview
permissions:
deployments: write
runs-on: ubuntu-latest
steps:
- uses: chrnorm/[email protected]
name: Create GitHub deployment for vrt-all-flags
id: vrt-all-flags
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: vrt-all-flags-${{ github.event.workflow_run.event.number }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags'
- name: Update vrt-all-flags deployment status (success)
if: success()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags'
state: 'success'
deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }}
- name: Update vrt-all-flags deployment status (failure)
if: failure()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
state: 'failure'
deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }}

deploy-aat-no-flag:
name: AAT (No flags enabled)
if: ${{ github.event.workflow_run.head_repository.full_name == 'primer/react' }}
needs: deploy-preview
permissions:
deployments: write
runs-on: ubuntu-latest
steps:
- uses: chrnorm/[email protected]
name: Create GitHub deployment for aat-no-flag
id: aat-no-flag
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: aat-no-flag-${{ github.event.workflow_run.event.number }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag'
- name: Update aat-no-flag deployment status (success)
if: success()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag'
state: 'success'
deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }}
- name: Update aat-no-flag deployment status (failure)
if: failure()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
state: 'failure'
deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }}

deploy-aat-all-flags:
name: AAT (All flags enabled)
if: ${{ github.event.workflow_run.head_repository.full_name == 'primer/react' }}
needs: deploy-preview
permissions:
deployments: write
runs-on: ubuntu-latest
steps:
- uses: chrnorm/[email protected]
name: Create GitHub deployment for aat-all-flags
id: aat-all-flags
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: aat-all-flags-${{ github.event.workflow_run.event.number }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags'
- name: Update aat-all-flags deployment status (success)
if: success()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags'
state: 'success'
deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }}
- name: Update aat-all-flags deployment status (failure)
if: failure()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
state: 'failure'
deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/app-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@primer/react": "37.9.0",
"@primer/react": "37.9.1",
"next": "^14.2.15",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/codesandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.3.1",
"@vitejs/plugin-react": "^4.3.3",
"@primer/react": "37.9.0",
"@primer/react": "37.9.1",
"eslint": "^8.56.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.7",
Expand Down
4 changes: 2 additions & 2 deletions examples/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@primer/octicons-react": "^19.9.0",
"@primer/react": "37.9.0",
"@primer/octicons-react": "^19.14.0",
"@primer/react": "37.9.1",
"clsx": "^1.2.1",
"next": "^14.2.15",
"react": "^18.3.1",
Expand Down
Loading

0 comments on commit fa3427d

Please sign in to comment.