-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add workflow for CI and deployment of web
- Loading branch information
Showing
2 changed files
with
51 additions
and
6 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,51 @@ | ||
on: | ||
push: | ||
branches: [main] | ||
paths: ['apps/web/**'] | ||
pull_request: | ||
paths: ['apps/web/**'] | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
name: Validate | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install packages | ||
run: | | ||
pnpm i | ||
- name: Lint | ||
run: | | ||
pnpm run lint:web | ||
- name: Test | ||
run: | | ||
pnpm run test:web | ||
deploy: | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
name: Lint | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install packages | ||
run: | | ||
pnpm i | ||
- name: Build | ||
run: | | ||
pnpm run build:web | ||
- name: Deploy | ||
run: | | ||
pnpm install --global vercel | ||
vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
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