-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Migrate to vercel url rewrites (#15)
- Loading branch information
1 parent
c30e969
commit 9416920
Showing
109 changed files
with
640 additions
and
554 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Vercel Preview Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
TURBO_TOKEN: ${{ secrets.VERCEL_TOKEN }} | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
jobs: | ||
Generate-Matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
project-matrix: ${{ steps.set-project-ids.outputs.project-matrix }} | ||
steps: | ||
- name: Extract Matrix | ||
id: set-project-ids | ||
run: | | ||
echo "project-matrix=$(echo '${{ vars.PROJECT_IDS }}' | jq -r 'keys' | tr -d ' \n\t\r')" >> "$GITHUB_OUTPUT" | ||
Deploy-Preview: | ||
needs: [Generate-Matrix] | ||
strategy: | ||
matrix: | ||
experiment: ${{ fromJson(needs.Generate-Matrix.outputs.project-matrix) }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-${{ matrix.experiment }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.experiment }}-pnpm-store- | ||
- name: Extract Project ID | ||
id: set-project-id | ||
run: | | ||
echo "PROJECT_ID=$(echo '${{ vars.PROJECT_IDS }}' | jq '."${{ matrix.experiment }}"')" >> $GITHUB_ENV | ||
- name: Set Project ID as Environment Variable | ||
run: echo "VERCEL_PROJECT_ID=${{ fromJson(env.PROJECT_ID) }}" >> $GITHUB_ENV | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Check For Changes | ||
id: check-for-changes | ||
continue-on-error: true | ||
run: | | ||
pnpm dlx turbo-ignore ${{ matrix.experiment }} --task=build | ||
- name: Build and Deploy | ||
if: steps.check-for-changes.outcome == 'failure' | ||
run: | | ||
pnpm install --global vercel@latest | ||
vercel pull --environment=preview -t ${{ secrets.VERCEL_TOKEN }} -y | ||
vercel build -A experiments/${{ matrix.experiment }}/vercel.json -t ${{ secrets.VERCEL_TOKEN }} -y | ||
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Vercel Production Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
TURBO_TOKEN: ${{ secrets.VERCEL_TOKEN }} | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
Generate-Matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
project-matrix: ${{ steps.set-project-ids.outputs.project-matrix }} | ||
steps: | ||
- name: Extract Matrix | ||
id: set-project-ids | ||
run: | | ||
echo "project-matrix=$(echo '${{ vars.PROJECT_IDS }}' | jq -r 'keys' | tr -d ' \n\t\r')" >> "$GITHUB_OUTPUT" | ||
Deploy-Preview: | ||
needs: [Generate-Matrix] | ||
strategy: | ||
matrix: | ||
experiment: ${{ fromJson(needs.Generate-Matrix.outputs.project-matrix) }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-${{ matrix.experiment }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.experiment }}-pnpm-store- | ||
- name: Extract Project ID | ||
id: set-project-id | ||
run: | | ||
echo "PROJECT_ID=$(echo '${{ vars.PROJECT_IDS }}' | jq '."${{ matrix.experiment }}"')" >> $GITHUB_ENV | ||
- name: Set Project ID as Environment Variable | ||
run: echo "VERCEL_PROJECT_ID=${{ fromJson(env.PROJECT_ID) }}" >> $GITHUB_ENV | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Check For Changes | ||
id: check-for-changes | ||
continue-on-error: true | ||
run: | | ||
pnpm dlx turbo-ignore ${{ matrix.experiment }} --task=build | ||
- name: Build and Deploy | ||
if: steps.check-for-changes.outcome == 'failure' | ||
run: | | ||
pnpm install --global vercel@latest | ||
vercel pull --environment=production -t ${{ secrets.VERCEL_TOKEN }} -y | ||
vercel build -A experiments/${{ matrix.experiment }}/vercel.json -t ${{ secrets.VERCEL_TOKEN }} -y --prod | ||
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ node_modules | |
|
||
# testing | ||
coverage | ||
.vars | ||
|
||
# next.js | ||
.next/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["plugin:custom/next"], | ||
rules: { | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-namespace": "off", | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
apps/lab/app/experiments/ExtraDimensionalInputForm/Experiment.tsx
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
apps/lab/app/experiments/ExtraDimensionalInputForm/page.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
9416920
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
lab-2023 – ./
lab-2023-jmberesford.vercel.app
lab-2023-git-main-jmberesford.vercel.app
lab-2023.vercel.app
lab.john-beresford.com