Skip to content

Commit e66da99

Browse files
committed
chore: deploy to vercel
1 parent cf6325b commit e66da99

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

.github/workflows/main.yml

+15-17
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,29 @@ concurrency:
1111
cancel-in-progress: false
1212

1313
jobs:
14-
build:
15-
name: build
14+
build-dev:
15+
name: build-dev
1616
runs-on: ubuntu-latest
1717
env:
1818
NEXT_PUBLIC_BASE_PATH: /norwegian-public-organizations
19+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
20+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
1921
steps:
2022
- name: Checkout
2123
uses: actions/checkout@v4
2224
- name: setup bun
2325
uses: oven-sh/setup-bun@v1
24-
- name: Install packages
25-
run: bun install
26-
- name: Build
27-
run: bun run build
28-
- name: Upload artifact
29-
uses: actions/upload-pages-artifact@v3
30-
with:
31-
path: ./out
26+
- name: Install Vercel CLI
27+
run: bun install --global vercel@latest
28+
- name: Pull Vercel Environment Information
29+
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
30+
- name: Build Project Artifacts
31+
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
32+
3233
deploy:
33-
environment:
34-
name: github-pages
35-
url: ${{ steps.deployment.outputs.page_url }}
34+
name: deploy
3635
runs-on: ubuntu-latest
37-
needs: build
36+
needs: build-dev
3837
steps:
39-
- name: Deploy to GitHub Pages
40-
id: deployment
41-
uses: actions/deploy-pages@v4
38+
- name: Deploy Project Artifacts to Vercel
39+
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

0 commit comments

Comments
 (0)