-
Notifications
You must be signed in to change notification settings - Fork 156
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
06729ec
commit f6a9610
Showing
1 changed file
with
34 additions
and
16 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,21 +1,39 @@ | ||
name: Vercel Preview Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
name: Preview Deployment | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
branches: | ||
- 'feat/*' | ||
pull_request: | ||
branches: | ||
- 'feat/*' | ||
|
||
jobs: | ||
Deploy-Preview: | ||
vercel: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache Dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.bun | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }} | ||
restore-keys: ${{ runner.os }}-bun- | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v1 | ||
|
||
- name: Build | ||
run: | | ||
bun install | ||
bun run build | ||
- name: Deploy to Staging | ||
id: deploy-vercel-staging | ||
uses: amondnet/vercel-action@v20 | ||
with: | ||
vercel-token: ${{ secrets.VERCEL_TOKEN }} | ||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | ||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | ||
scope: ${{ secrets.VERCEL_ORG_ID }} |