Skip to content

Init PetalNotes

Init PetalNotes #431

Workflow file for this run

---
name: Continuous Integration
on:
# Run on pushes to the default branch.
push:
branches:
- main
# Run on all PRs.
pull_request:
types:
- opened
- synchronize
- reopened
# Support merge queues.
merge_group:
# Run on a schedule.
schedule:
- cron: "0 14 * * 1" # Every Monday at 9 in the morning CST
# Allow running this workflow manually from the Actions tab.
workflow_dispatch:
env:
CI: true
permissions:
contents: read # Needed to clone the repository
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: 📚 Git checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
clean: true
persist-credentials: false
set-safe-directory: true
- name: ⠨⠿ Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: ⬢ Install Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: .nvmrc
cache: "pnpm"
- name: ⚙️ Cache Turbo
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
id: cache-turbo
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: 🎾 Fetch package metadata
run: pnpm fetch
- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile --offline
- name: 🎭 Install browser
run: pnpm dlx playwright install --with-deps
- name: 🌐 Disable analytics
run: pnpm exec turbo telemetry disable
- name: 🔨 Build
run: pnpm run build
- name: 🕵️ Merge Checks
run: pnpm run merge-checks --continue
# - name: 🧹 Check for deduped dependencies
# run: pnpm exec turbo check-deduped-deps
- name: ⚙️ Upload GPA Calculator
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: gpa-calculator
path: "./apps/gpa-calculator/dist/"
if-no-files-found: error
- name: ⚙️ Upload Map
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: phs-map
path: "./apps/phs-map/dist/"
if-no-files-found: error
deploy-calculator:
name: Deploy GPA Calculator
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 4
permissions:
id-token: write # Needed for auth with Deno Deploy
concurrency:
group: ${{ github.workflow }}=${{ github.ref }}-deploy-calculator
cancel-in-progress: true
steps:
- name: ⚙️ Download GPA Calculator
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: gpa-calculator
path: "./apps/gpa-calculator/dist/"
- name: 🔧 Upload to Deno Deploy
id: deploy
uses: denoland/deployctl@01283bc66613e6b67e329ac8e1eccdcf3c188c93 # 1.13.0
with:
project: "gpa-calculator"
entrypoint: https://deno.land/[email protected]/http/file_server.ts
root: "./apps/gpa-calculator/dist/"
deploy-map:
name: Deploy Map
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 4
permissions:
id-token: write # Needed for auth with Deno Deploy
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-deploy-map
cancel-in-progress: true
steps:
- name: ⚙️ Download Map
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: phs-map
path: "./apps/phs-map/dist/"
- name: 🔧 Upload to Deno Deploy
id: deploy
uses: denoland/deployctl@01283bc66613e6b67e329ac8e1eccdcf3c188c93 # 1.13.0
with:
project: "phs-map"
entrypoint: https://deno.land/[email protected]/http/file_server.ts
root: "./apps/phs-map/dist/"