Skip to content

perf: inline CSS to drop render-blocking request (#4) #12

perf: inline CSS to drop render-blocking request (#4)

perf: inline CSS to drop render-blocking request (#4) #12

Workflow file for this run

name: Build CV
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
- name: Install WeasyPrint system libraries
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz0b \
libcairo2 libgdk-pixbuf-2.0-0
- name: Install Python deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build
run: python scripts/build.py
- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v5
- name: Upload Pages artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: public/
- name: Upload public/ as workflow artifact (PRs)
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: public
path: public/
retention-days: 7
lighthouse:
if: github.event_name == 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download built site
uses: actions/download-artifact@v4
with:
name: public
path: public
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v12
with:
# URLs and staticDistDir live in .lighthouserc.json so the local
# `npx lhci autorun` workflow stays in sync with CI.
uploadArtifacts: true
temporaryPublicStorage: true
configPath: ./.lighthouserc.json
deploy:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4