Skip to content

Commit

Permalink
ci: fix prax website deploy (#31)
Browse files Browse the repository at this point in the history
* ci: fix prax website deploy

Restores some crucial Firebase configs to straighten out the CD pipeline
for updating the prax marketing website, hosted on Firebase.
Uses a custom runner, to reduce job time from ~12m on ubuntu-latest to
~5m on the faster version.

* rebase & fix lint

---------

Co-authored-by: Conor Schaefer <[email protected]>
Co-authored-by: Gabe Rodriguez <[email protected]>
  • Loading branch information
3 people authored Jun 20, 2024
1 parent e9b0d0d commit 237ee61
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "prax-website-1aea3"
}
}
15 changes: 10 additions & 5 deletions .github/workflows/deploy-firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,27 @@ on:
jobs:
build:
name: Deploy
runs-on: ubuntu-latest
# The build step takes a lot of CPU, so we'll bump up to 8 vCPUs.
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- name: Checkout the source code
uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Install dependencies
- name: Install npm dependencies
run: pnpm install

- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: 'latest'

- name: Build static site
run: pnpm build
working-directory: apps/prax-marketing-site

- name: Deploy dapp static site to firebase
# N.B. the firebase-action helper doesn't support semver, e.g. `@v13`,
Expand All @@ -37,4 +43,3 @@ jobs:
args: deploy
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_PATH: apps/prax-marketing-site/dist
6 changes: 6 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"hosting": {
"public": "apps/prax-marketing-site/dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}

0 comments on commit 237ee61

Please sign in to comment.