-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (122 loc) · 4.02 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
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-
# fetch registry metadata
- name: 🎾 Fetch package metadata
run: pnpm fetch
- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile --offline
- 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/"