-
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.
- Loading branch information
1 parent
93f4262
commit e908d56
Showing
3 changed files
with
51 additions
and
31 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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# .github/workflows/common/preview.yaml | ||
name: Reusable Preview Workflow | ||
|
||
on: | ||
|
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,38 @@ | ||
name: Reusable Production Workflow | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
vercel_project_name: | ||
required: true | ||
vercel_scope: | ||
required: true | ||
vercel_token: | ||
required: true | ||
|
||
jobs: | ||
shared-steps: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
|
||
- name: Install Corepack | ||
run: corepack install | ||
|
||
- name: Link Project to Vercel | ||
run: yarn dlx -q vercel link --project=$VERCEL_PROJECT_NAME --scope=$VERCEL_SCOPE --yes --token=$VERCEL_TOKEN | ||
|
||
- name: Pull Vercel Environment Information | ||
run: yarn dlx -q vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Build Project Artifacts | ||
run: yarn dlx -q vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Deploy Project Artifacts to Vercel | ||
run: yarn dlx -q vercel deploy --prebuilt --prod --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 |
---|---|---|
@@ -1,37 +1,20 @@ | ||
name: Vercel Production Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | ||
VERCEL_SCOPE: ${{ secrets.VERCEL_SCOPE }} | ||
VERCEL_PROJECT_NAME: ${{ secrets.VERCEL_PROJECT_NAME }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
Deploy-Production: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
|
||
- name: Install Corepack | ||
run: corepack install | ||
|
||
- name: Link Project to Vercel | ||
run: yarn dlx -q vercel link --project=$VERCEL_PROJECT_NAME --scope=$VERCEL_SCOPE --yes --token=$VERCEL_TOKEN | ||
|
||
- name: Pull Vercel Environment Information | ||
run: yarn dlx -q vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Build Project Artifacts | ||
run: yarn dlx -q vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
default-example: | ||
uses: ./.github/workflows/production-common.yaml | ||
secrets: | ||
vercel_project_name: ${{ secrets.VERCEL_NAME_EXAMPLE_DEFAULT }} | ||
vercel_scope: ${{ secrets.VERCEL_SCOPE }} | ||
vercel_token: ${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Deploy Project Artifacts to Vercel | ||
run: yarn dlx -q vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
upgrade-example: | ||
uses: ./.github/workflows/production-common.yaml | ||
secrets: | ||
vercel_token: ${{ secrets.VERCEL_TOKEN }} | ||
vercel_project_name: ${{ secrets.VERCEL_NAME_EXAMPLE_UPGRADE }} | ||
vercel_scope: ${{ secrets.VERCEL_SCOPE }} |