fix: fixed rendering the Poppins font properly (#288) #112
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
name: Vercel Preview Deployment | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
on: | |
push: | |
branches-ignore: | |
- main | |
- "dependabot/**" | |
pull_request: | |
branches-ignore: | |
- main | |
- "dependabot/**" | |
jobs: | |
code-quality-checks: | |
name: Code QA Checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js in the Runtime | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: "npm" | |
- name: Install the Dependencies | |
run: npm ci | |
- name: Run Code Quality Checks | |
run: npm run lint | |
- name: Run Prettier to Check for Formatting Issues | |
run: npm run format | |
deploy-preview: | |
name: Preview Deployment | |
runs-on: ubuntu-latest | |
env: | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
outputs: | |
preview-url: ${{ steps.deployment_url.outputs.PREVIEW_URL }} | |
environment: | |
name: Preview | |
url: ${{ steps.deployment_url.outputs.PREVIEW_URL }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Vercel CLI | |
run: npm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
id: deployment_url | |
run: echo "PREVIEW_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> "$GITHUB_OUTPUT" | |
# INFO: See the documentation below for information about this: | |
# https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs#example-defining-outputs-for-a-job | |
lighthouse-report: | |
name: Lighthouse Check | |
runs-on: ubuntu-latest | |
needs: deploy-preview | |
env: | |
VERCEL_LIGHTHOUSE_PROJECT_ID: ${{ secrets.VERCEL_LIGHTHOUSE_PROJECT_ID }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js for the Environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: "npm" | |
- name: Install the Dependencies | |
run: npm install --global @unlighthouse/cli puppeteer | |
- name: Generate the Lighthouse Report | |
env: | |
PREVIEW_URL: ${{ needs.deploy-preview.outputs.preview-url }} | |
# FIXME: Rather than passing flags to the binary, use a config file instead | |
run: unlighthouse-ci --site "$PREVIEW_URL" --budget 90 --build-static --reporter jsonExpanded | |
# TODO: Figure a way out to deploy the static contents online! | |
# TODO: Figure a way out to parse the JSON output and comment it on the PR |