fix(deps): update js/ts dependencies (major) #2254
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: CI & CD | |
on: | |
push: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
ci: | |
name: CI | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 10 | |
# Only run if this is not a pull request, or for pull requests on forks | |
if: github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != 'AlexTMjugador/Home' | |
steps: | |
- name: 📥 Checkout source | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: 🧰 Setup Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
with: | |
node-version: 20 | |
- name: 📥 Install dependencies | |
run: npm ci | |
- name: "🔍 Static analysis: run Prettier" | |
run: npm run format | |
- name: "🔍 Static analysis: run ESLint" | |
run: npm run lint | |
- name: 🔨 Build website | |
run: npm run build | |
- name: 📤 Upload website distribution bundle | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 | |
with: | |
name: Web distribution bundle | |
path: dist | |
- name: "🔍 Run Lighthouse CI" | |
uses: treosh/lighthouse-ci-action@2f8dda6cf4de7d73b29853c3f29e73a01e297bd8 # v12 | |
env: | |
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | |
with: | |
temporaryPublicStorage: true | |
cd: | |
name: CD | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 10 | |
needs: ci | |
permissions: | |
deployments: write | |
steps: | |
- name: 📥 Download website distribution bundle | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | |
with: | |
name: Web distribution bundle | |
path: dist | |
- name: 📤 Deploy to Cloudflare Pages | |
uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1 | |
with: | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
projectName: home | |
branch: ${{ github.ref_name }} | |
directory: dist |