-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4396 from signalco-io/next
Next
- Loading branch information
Showing
36 changed files
with
1,241 additions
and
1,034 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
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,89 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
|
||
name: '[Web] Vercel Deploy' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
required: true | ||
type: string | ||
description: 'Name of the package or application to analzye' | ||
path: | ||
required: true | ||
type: string | ||
description: 'Path to the package or application to analzye' | ||
vercelProjectId: | ||
required: true | ||
type: string | ||
description: 'Vercel Project ID' | ||
preview: | ||
required: false | ||
type: boolean | ||
description: 'Whether to deploy to preview or production' | ||
default: true | ||
environment: | ||
required: false | ||
type: string | ||
description: 'Environment to deploy to, can be preview, development, or production' | ||
default: 'preview' | ||
|
||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: signalco | ||
TURBO_REMOTE_ONLY: true | ||
VERCEL_PROJECT_ID: ${{ inputs.vercelProjectId }} | ||
VERCEL_ORG_ID: team_Ade0MlfC3211ml3wYJZ4c9hn | ||
|
||
defaults: | ||
run: | ||
working-directory: ./web | ||
|
||
jobs: | ||
ci: | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.name }} | ||
cancel-in-progress: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: ✨ Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 'latest' | ||
|
||
- name: ✨ Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
cache: "pnpm" | ||
cache-dependency-path: ./web/pnpm-lock.yaml | ||
|
||
- name: 📦️ Install dependencies | ||
run: pnpm install --frozen-lockfile --filter ${{ inputs.name }}... --filter . | ||
|
||
- name: ✨ Setup Vercel CLI | ||
run: pnpm add --global vercel@latest | ||
|
||
- name: ⚙️ Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=${{ inputs.environment }} --token=${{ secrets.VERCEL_TOKEN }} | ||
working-directory: ${{ inputs.path }}/ | ||
|
||
- name: ⚒️ Build app | ||
run: vercel build ${{ inputs.preview == false && '--prod' }} --token=${{ secrets.VERCEL_TOKEN }} | ||
working-directory: ${{ inputs.path }}/ | ||
|
||
- name: 🚀 Deploy Preview to Vercel | ||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | ||
working-directory: ${{ inputs.path }}/ | ||
if: ${{ inputs.preview == true }} | ||
|
||
- name: 🚀 Deploy Production to Vercel | ||
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} ${{ inputs.environment == 'development' && '--skip-domain' }} | ||
working-directory: ${{ inputs.path }}/ | ||
if: ${{ inputs.preview == false }} | ||
|
Oops, something went wrong.