Skip to content

Commit

Permalink
Merge branch 'dev' into CGD-33-Navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
marktlinn committed Sep 8, 2023
2 parents 684c3b0 + 86bce5e commit ed001c7
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Deploy PR to Preview
name: Deploy to Vercel Preview
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
pull_request:
workflow_dispatch:
push:
branches:
[main, dev]
- premium-strip

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -18,12 +19,14 @@ jobs:
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: build project artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy preview
id: preview-deploy
run: echo "URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | tail -n 1)" >> $GITHUB_OUTPUT
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Preview URL ${{ steps.preview-deploy.outputs.URL }}
comment_tag: execution
- name: deploy preview + assign beta domain
run: |
OUTPUT=$(du --inodes -d 5 .vercel/output)
echo "$OUTPUT"
LAST=$(echo "$OUTPUT" | tail -n 1)
PERCENTAGE=$(echo "$LAST" | awk 'BEGIN {maxtotal=15000} { printf "%.2f%%", ($1/maxtotal*100) }')
echo "Vercel file usage percentage" >> $GITHUB_STEP_SUMMARY
echo "$PERCENTAGE" >> $GITHUB_STEP_SUMMARY
du -h -d 3 .vercel/output/functions/en
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > domain.txt
vercel alias --scope ${{ secrets.VERCEL_TEAM_ID }} --token ${{ secrets.VERCEL_TOKEN }} set `cat domain.txt` biodrop-preview.vercel.app

0 comments on commit ed001c7

Please sign in to comment.