⬆️ Update all of nextjs to version 13.4.7 #2275
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
- push | |
jobs: | |
check-format: | |
name: Check code formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install npm packages | |
uses: bahmutov/npm-install@v1 | |
- run: npm run format:check | |
validate-code: | |
name: Validate code style | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install npm packages | |
uses: bahmutov/npm-install@v1 | |
- run: npm run lint | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install npm packages | |
uses: bahmutov/npm-install@v1 | |
- run: npm run build --if-present | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install npm packages | |
uses: bahmutov/npm-install@v1 | |
- run: npm run ci-test:unit | |
- name: Codecov | |
uses: codecov/codecov-action@v3 # https://github.com/codecov/codecov-action | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: chrnorm/deployment-action@v2 | |
name: Create GitHub deployment | |
id: deployment | |
with: | |
token: ${{ secrets.DEPLOYMENT_GITHUB_TOKEN }} | |
initial-status: in_progress | |
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Preview'}} | |
- name: Deploy to Vercel | |
uses: amondnet/vercel-action@v25.1.0 | |
id: vercel-deployment | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-args: ${{ github.ref == 'refs/heads/main' && '--prod' || ''}} | |
- name: Update deployment status (success) | |
if: success() | |
uses: chrnorm/deployment-status@v2 | |
with: | |
token: ${{ secrets.DEPLOYMENT_GITHUB_TOKEN }} | |
environment-url: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_URL || steps.vercel-deployment.outputs.preview-url }} | |
state: success | |
deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
- name: Update deployment status (failure) | |
if: failure() | |
uses: chrnorm/deployment-status@v2 | |
with: | |
token: ${{ secrets.DEPLOYMENT_GITHUB_TOKEN }} | |
environment-url: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_URL || steps.vercel-deployment.outputs.preview-url }} | |
state: failure | |
deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
outputs: | |
preview-url: ${{ steps.vercel-deployment.outputs.preview-url }} | |
lighthouse: | |
name: Run Lighthouse checks | |
runs-on: ubuntu-latest | |
needs: | |
- deploy | |
steps: | |
- name: Lighthouse Check | |
id: lighthouse-check | |
uses: foo-software/lighthouse-check-action@master # https://github.com/foo-software/lighthouse-check-action | |
with: | |
accessToken: ${{ secrets.GITHUB_TOKEN }} | |
prCommentEnabled: true | |
urls: https://oppmuntring.sindre.is,${{ needs.deploy.outputs.preview-url }} | |
- name: Handle Lighthouse Check results | |
uses: foo-software/lighthouse-check-status-action@master | |
with: | |
lighthouseCheckResults: ${{ steps.lighthouse-check.outputs.lighthouseCheckResults }} | |
minAccessibilityScore: "100" | |
minBestPracticesScore: "100" | |
minPerformanceScore: "70" | |
minProgressiveWebAppScore: "25" | |
minSeoScore: "55" | |
e2e: | |
name: Run e2e tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install npm packages | |
uses: bahmutov/npm-install@v1 | |
- name: Run e2e tests | |
run: npm run run-ci-e2e |