diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index e6cf6ee5..56c484af 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -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 @@ -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 \ No newline at end of file diff --git a/src/app/ideation/components/VoteCard.tsx b/src/app/ideation/components/VoteCard.tsx index f236e3e6..2b0c39bc 100644 --- a/src/app/ideation/components/VoteCard.tsx +++ b/src/app/ideation/components/VoteCard.tsx @@ -12,7 +12,9 @@ function VoteCard({ users, voted }: VoteCardProps) {

{users.length}

-

{`Vote${users.length > 1 ? "s" : ""}`}

+

{`Vote${ + users.length > 1 ? "s" : "" + }`}

{users.map((user) => (