This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
-
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.
Co-authored-by: Dennis Trümper <[email protected]>
- Loading branch information
1 parent
09359e1
commit 6523644
Showing
1 changed file
with
38 additions
and
0 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,38 @@ | ||
name: Release Bata on commit to main | ||
|
||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
CI: true | ||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
pullrequest-job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version-file: .nvmrc | ||
- name: npm install | ||
if: steps.cache-node_modules.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Pull Vercel Environment Information | ||
run: npx vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: npx vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
id: deploy-frontend | ||
run: | | ||
url=$(npx vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}) | ||
echo "FRONTEND_URL=$url" >> "$GITHUB_OUTPUT" |