Skip to content

Commit eb6e430

Browse files
committed
chore(build): migrate to vercel
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent c9f9c26 commit eb6e430

11 files changed

Lines changed: 2285 additions & 4523 deletions

File tree

.cspell.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"yarn.lock"
3232
],
3333
"ignoreRegExpList": [],
34-
"ignoreWords": ["flexdevelopmentllc", "firebaserc", "fldv"],
34+
"ignoreWords": ["flexdevelopmentllc", "fldv"],
3535
"language": "en-US",
3636
"patterns": [],
3737
"readonly": true,

.firebaserc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/infrastructure.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ branches:
2727
- context: auto-review
2828
- context: commitlint
2929
- context: dependabot-dedupe
30-
- context: firebase
3130
- context: format
3231
- context: lint
3332
- context: spelling
33+
- context: vercel
3434
strict: true
3535
restrictions: null
3636
environments:
37-
- environment_name: firebase
37+
- environment_name: preview
3838
- environment_name: release
3939
labels:
4040
- name: flag:breaking-change

.github/workflows/ci.yml

Lines changed: 49 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
1313
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#push
1414
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch
15-
# - https://github.com/FirebaseExtended/action-hosting-deploy
1615
# - https://github.com/actions/cache
1716
# - https://github.com/actions/cache/discussions/650
1817
# - https://github.com/actions/checkout
@@ -25,6 +24,9 @@
2524
# - https://github.com/flex-development/manver-action
2625
# - https://github.com/hmarr/debug-action
2726
# - https://github.com/streetsidesoftware/cspell-action
27+
# - https://vercel.com/docs/cli/build
28+
# - https://vercel.com/docs/cli/deploy
29+
# - https://vercel.com/docs/cli/pull
2830
# - https://yarnpkg.com/cli/pack
2931

3032
---
@@ -205,41 +207,9 @@ jobs:
205207
root: ${{ github.workspace }}
206208
treat_flagged_words_as_errors: true
207209
verbose: true
208-
firebase:
209-
needs:
210-
- commitlint
211-
- format
212-
- lint
213-
- preflight
214-
- spelling
215-
permissions:
216-
checks: write
217-
contents: read
218-
pull-requests: write
219-
runs-on: ubuntu-latest
220-
environment:
221-
name: firebase
222-
steps:
223-
- id: checkout
224-
name: Checkout ${{ env.REF_NAME }}
225-
uses: actions/checkout@v6.0.2
226-
with:
227-
persist-credentials: false
228-
ref: ${{ env.REF }}
229-
- id: deploy
230-
name: Deploy to Firebase Hosting
231-
uses: FirebaseExtended/action-hosting-deploy@v0.10.0
232-
with:
233-
channelId: ${{ env.SHA }}
234-
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLEXDEVELOPMENTLLC }}
235-
repoToken: ${{ secrets.GITHUB_TOKEN }}
236-
- id: url
237-
name: Print preview channel URL
238-
run: echo ${{ steps.deploy.outputs.details_url }}
239210
artifacts:
240211
needs:
241212
- commitlint
242-
- firebase
243213
- format
244214
- lint
245215
- preflight
@@ -287,3 +257,49 @@ jobs:
287257
with:
288258
name: ${{ steps.tarball.outputs.result }}
289259
path: ${{ steps.tarball.outputs.result }}
260+
vercel:
261+
needs:
262+
- artifacts
263+
- commitlint
264+
- format
265+
- lint
266+
- preflight
267+
- spelling
268+
runs-on: ubuntu-latest
269+
environment: preview
270+
env:
271+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
272+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
273+
steps:
274+
- id: checkout
275+
name: Checkout ${{ env.REF_NAME }}
276+
uses: actions/checkout@v6.0.2
277+
with:
278+
fetch-depth: 0
279+
persist-credentials: false
280+
ref: ${{ env.REF }}
281+
- id: node
282+
name: Setup Node.js
283+
uses: actions/setup-node@v6.3.0
284+
with:
285+
cache: yarn
286+
cache-dependency-path: yarn.lock
287+
node-version-file: .nvmrc
288+
- id: cache
289+
name: Restore dependencies cache
290+
uses: actions/cache@v5.0.4
291+
with:
292+
key: ${{ needs.preflight.outputs.cache-key }}
293+
path: ${{ env.CACHE_PATH }}
294+
- id: local-binaries
295+
name: Add local binaries to $PATH
296+
run: echo "$GITHUB_WORKSPACE/node_modules/.bin" >> $GITHUB_PATH
297+
- id: env
298+
name: Pull environment
299+
run: vercel pull --environment=preview --yes --token=${{ secrets.VERCEL_TOKEN }}
300+
- id: build
301+
name: Build site
302+
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
303+
- id: deploy
304+
name: Deploy site preview
305+
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ e.g:
345345
346346
<!--
347347
3. [`deploy`](.github/workflows/deploy.yml)
348-
- deploy to firebase
348+
- deploy to vercel
349349
-->
350350
351351
[commitlint]: https://github.com/conventional-changelog/commitlint

firebase.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"CHANGELOG.md",
1717
"LICENSE.md",
1818
"README.md",
19-
".firebaserc",
20-
"firebase.json"
19+
"vercel.mts"
2120
],
2221
"exports": {
2322
"./package.json": "./package.json"
@@ -36,7 +35,6 @@
3635
"clean:modules": "trash ./.yarn/{cache,*.gz} ./node_modules",
3736
"clean:pack": "trash \"./*.tgz\"",
3837
"commitlint": "commitlint -V",
39-
"deploy": "firebase deploy --only hosting",
4038
"fix:cg": "yarn fix:format && yarn fix:lint",
4139
"fix:dedupe": "yarn dedupe --strategy=highest",
4240
"fix:format": "dprint fmt",
@@ -47,8 +45,7 @@
4745
"prepack": "toggle-scripts -postinstall",
4846
"prepublishOnly": "toggle-scripts -prepack",
4947
"release": "bash ./scripts/release.sh",
50-
"remark": "remark .",
51-
"start": "firebase emulators:start --only hosting"
48+
"remark": "remark ."
5249
},
5350
"devDependencies": {
5451
"@commitlint/cli": "20.5.0",
@@ -60,20 +57,21 @@
6057
"@tsconfig/strictest": "2.0.8",
6158
"@types/concat-stream": "2.0.3",
6259
"@vates/toggle-scripts": "1.0.0",
60+
"@vercel/config": "0.1.0",
6361
"concat-stream": "2.0.0",
6462
"cspell": "9.7.0",
6563
"devlop": "1.1.0",
6664
"dprint": "0.53.2",
6765
"editorconfig": "3.0.2",
6866
"eslint": "9.39.4",
69-
"firebase-tools": "15.12.0",
7067
"husky": "9.1.7",
7168
"remark": "15.0.1",
7269
"remark-cli": "12.0.1",
7370
"sh-syntax": "0.5.8",
7471
"trash-cli": "7.2.0",
7572
"typescript": "6.0.2",
7673
"unified": "11.0.5",
74+
"vercel": "50.38.2",
7775
"vfile": "6.0.3"
7876
},
7977
"packageManager": "yarn@4.12.0",

public/404.html

Lines changed: 0 additions & 108 deletions
This file was deleted.

public/index.html

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)