From 8a26d1eb218921cd8e7a450084b4904cc9e9b26a Mon Sep 17 00:00:00 2001 From: Mark Linn Date: Sat, 9 Sep 2023 10:01:55 +0200 Subject: [PATCH 1/3] trial workflow --- .github/workflows/preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 56c484af..7918c2fa 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: push: branches: - - premium-strip + [main, dev] jobs: deploy: From 254f3a9e5ed6754341f9a76d062358eec4bd5198 Mon Sep 17 00:00:00 2001 From: Mark Linn Date: Sat, 9 Sep 2023 13:17:40 +0200 Subject: [PATCH 2/3] add: run workflow on pr --- .github/workflows/preview.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 7918c2fa..9ec6ab12 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -3,10 +3,9 @@ env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: - workflow_dispatch: - push: + pull_request: branches: - [main, dev] + - dev jobs: deploy: From 4ba6c6e1a59483b61356f3722b6902a8420ae6fc Mon Sep 17 00:00:00 2001 From: Mark Linn Date: Sat, 9 Sep 2023 13:18:55 +0200 Subject: [PATCH 3/3] chore: remove vercel preview workflow --- .github/workflows/preview.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml deleted file mode 100644 index 9ec6ab12..00000000 --- a/.github/workflows/preview.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Deploy to Vercel Preview -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} -on: - pull_request: - branches: - - dev - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: install Vercel CLI - run: npm install --global vercel@latest - - name: pull Vercel environment information - run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - - name: build project artifacts - run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - - 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