Skip to content

Commit

Permalink
Vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Oct 25, 2024
1 parent 69737ae commit 757a8e6
Show file tree
Hide file tree
Showing 127 changed files with 1,139 additions and 26,370 deletions.
8 changes: 0 additions & 8 deletions .cargo/config.toml

This file was deleted.

147 changes: 75 additions & 72 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,91 +27,94 @@ jobs:
- name: Git clone the repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: latest
# - uses: pnpm/action-setup@v4
# with:
# version: latest

- name: Install dependencies
run: pnpm i
# - name: Install dependencies
# run: pnpm i

- name: Build
working-directory: apps/landing
env:
NITRO_PRESET: cloudflare_pages
run: pnpm build
# - name: Build
# working-directory: apps/landing
# env:
# NITRO_PRESET: cloudflare_pages
# run: pnpm build

- name: Deploy
working-directory: apps/landing
run: |
set -o pipefail
pnpm dlx wrangler pages deploy dist/ --project-name landing 2>&1 | tee -a BUILD_OUTPUT
# - name: Deploy
# working-directory: apps/landing
# run: |
# set -o pipefail
# pnpm dlx wrangler pages deploy dist/ --project-name landing 2>&1 | tee -a BUILD_OUTPUT

- name: Export `DEPLOYMENT_URL`
id: result
run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT
# - name: Export `DEPLOYMENT_URL`
# working-directory: apps/landing
# id: result
# run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT

web:
name: Web
runs-on: ubuntu-latest
environment:
name: web
url: ${{ steps.result.outputs.DEPLOYMENT_URL }}
steps:
- name: Git clone the repository
uses: actions/checkout@v4
# web:
# name: Web
# runs-on: ubuntu-latest
# environment:
# name: web
# url: ${{ steps.result.outputs.DEPLOYMENT_URL }}
# steps:
# - name: Git clone the repository
# uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: latest
# - uses: pnpm/action-setup@v4
# with:
# version: latest

- name: Install dependencies
run: pnpm i
# - name: Install dependencies
# run: pnpm i

- name: Build
working-directory: apps/web
env:
NITRO_PRESET: cloudflare_pages
run: pnpm build
# - name: Build
# working-directory: apps/web
# env:
# NITRO_PRESET: cloudflare_pages
# run: pnpm build

- name: Deploy
working-directory: apps/web
run: |
set -o pipefail
pnpm dlx wrangler pages deploy dist/ --project-name web 2>&1 | tee -a BUILD_OUTPUT
# - name: Deploy
# working-directory: apps/web
# run: |
# set -o pipefail
# pnpm dlx wrangler pages deploy dist/ --project-name web 2>&1 | tee -a BUILD_OUTPUT

- name: Export `DEPLOYMENT_URL`
id: result
run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT
# - name: Export `DEPLOYMENT_URL`
# working-directory: apps/web
# id: result
# run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT

api:
name: API
runs-on: ubuntu-latest
environment:
name: api
url: ${{ steps.result.outputs.DEPLOYMENT_URL }}
steps:
- name: Git clone the repository
uses: actions/checkout@v4
# api:
# name: API
# runs-on: ubuntu-latest
# environment:
# name: api
# url: ${{ steps.result.outputs.DEPLOYMENT_URL }}
# steps:
# - name: Git clone the repository
# uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: latest
# - uses: pnpm/action-setup@v4
# with:
# version: latest

- name: Install dependencies
run: pnpm i
# - name: Install dependencies
# run: pnpm i

- name: Build
working-directory: apps/api
env:
NITRO_PRESET: cloudflare_pages
run: pnpm build
# - name: Build
# working-directory: apps/api
# env:
# NITRO_PRESET: cloudflare_pages
# run: pnpm build

- name: Deploy
working-directory: apps/api
run: |
set -o pipefail
pnpm dlx wrangler deploy src/index.ts --define "import.meta.env.GIT_SHA:'$(git rev-parse HEAD)'" 2>&1 | tee -a BUILD_OUTPUT
# - name: Deploy
# working-directory: apps/api
# run: |
# set -o pipefail
# pnpm dlx wrangler deploy src/index.ts --define "import.meta.env.GIT_SHA:'$(git rev-parse HEAD)'" 2>&1 | tee -a BUILD_OUTPUT

- name: Export `DEPLOYMENT_URL`
id: result
run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT
# - name: Export `DEPLOYMENT_URL`
# working-directory: apps/api
# id: result
# run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

Loading

0 comments on commit 757a8e6

Please sign in to comment.