From d6d03217c0c6cd211cdb92e46dfe4111e4c988f5 Mon Sep 17 00:00:00 2001 From: LufsX Date: Mon, 23 Dec 2024 01:14:22 +0800 Subject: [PATCH 1/7] feat: test actions --- .gitea/workflows/Build.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .gitea/workflows/Build.yaml diff --git a/.gitea/workflows/Build.yaml b/.gitea/workflows/Build.yaml new file mode 100644 index 0000000..e23c896 --- /dev/null +++ b/.gitea/workflows/Build.yaml @@ -0,0 +1,22 @@ +name: Vercel Preview Deployment +on: + push: + branches-ignore: + - main + +jobs: + Deploy-Preview: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - 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 Project Artifacts to Vercel + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file -- 2.54.0 From c2ee082f49ecc322f7780709265be3db8c9794d2 Mon Sep 17 00:00:00 2001 From: LufsX Date: Mon, 23 Dec 2024 01:18:48 +0800 Subject: [PATCH 2/7] chore: test npm mirror --- .gitea/workflows/Build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/Build.yaml b/.gitea/workflows/Build.yaml index e23c896..33c86ec 100644 --- a/.gitea/workflows/Build.yaml +++ b/.gitea/workflows/Build.yaml @@ -12,6 +12,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Install Vercel CLI + run: | + npm config get registry + npm config set registry https://registry.npmmirror.com - name: Install Vercel CLI run: npm install --global vercel@latest - name: Pull Vercel Environment Information @@ -19,4 +23,4 @@ jobs: - name: Build Project Artifacts run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} -- 2.54.0 From 794c28005c883cc7a7569a69683feb1f77ad2f7c Mon Sep 17 00:00:00 2001 From: LufsX Date: Mon, 23 Dec 2024 01:27:15 +0800 Subject: [PATCH 3/7] chore: test --- .gitea/workflows/{Build.yaml => dev_build.yaml} | 14 +++++++++----- .gitignore | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) rename .gitea/workflows/{Build.yaml => dev_build.yaml} (65%) diff --git a/.gitea/workflows/Build.yaml b/.gitea/workflows/dev_build.yaml similarity index 65% rename from .gitea/workflows/Build.yaml rename to .gitea/workflows/dev_build.yaml index 33c86ec..84f47c5 100644 --- a/.gitea/workflows/Build.yaml +++ b/.gitea/workflows/dev_build.yaml @@ -1,4 +1,9 @@ name: Vercel Preview Deployment + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + on: push: branches-ignore: @@ -14,12 +19,11 @@ jobs: fetch-depth: 0 - name: Install Vercel CLI run: | - npm config get registry npm config set registry https://registry.npmmirror.com - - 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 }} + npm install --global vercel@latest + ls + # - 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 Project Artifacts to Vercel diff --git a/.gitignore b/.gitignore index 5ef6a52..9c8a03f 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +.vercel -- 2.54.0 From 7e687f3fd523a2dfeebd818ca78ca0fb4819a837 Mon Sep 17 00:00:00 2001 From: LufsX Date: Mon, 23 Dec 2024 01:29:56 +0800 Subject: [PATCH 4/7] feat: disable Vercel telemetry in dev build workflow --- .gitea/workflows/dev_build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/dev_build.yaml b/.gitea/workflows/dev_build.yaml index 84f47c5..d3eb335 100644 --- a/.gitea/workflows/dev_build.yaml +++ b/.gitea/workflows/dev_build.yaml @@ -21,6 +21,7 @@ jobs: run: | npm config set registry https://registry.npmmirror.com npm install --global vercel@latest + vercel telemetry disable ls # - name: Pull Vercel Environment Information # run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} -- 2.54.0 From 4286ba1fc0e4606bbf3c0ccdd927df7967a0b0e9 Mon Sep 17 00:00:00 2001 From: LufsX Date: Mon, 23 Dec 2024 01:30:59 +0800 Subject: [PATCH 5/7] chore: test actions --- .gitea/workflows/dev_build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/dev_build.yaml b/.gitea/workflows/dev_build.yaml index d3eb335..1f81a5f 100644 --- a/.gitea/workflows/dev_build.yaml +++ b/.gitea/workflows/dev_build.yaml @@ -23,8 +23,8 @@ jobs: npm install --global vercel@latest vercel telemetry disable ls - # - name: Pull Vercel Environment Information - # run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + - 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 Project Artifacts to Vercel -- 2.54.0 From d696fcae385c8b32187281239bf1e387985ba5c7 Mon Sep 17 00:00:00 2001 From: LufsX Date: Mon, 23 Dec 2024 01:32:26 +0800 Subject: [PATCH 6/7] chore: test actions --- .gitea/workflows/dev_build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/dev_build.yaml b/.gitea/workflows/dev_build.yaml index 1f81a5f..900e67f 100644 --- a/.gitea/workflows/dev_build.yaml +++ b/.gitea/workflows/dev_build.yaml @@ -21,8 +21,7 @@ jobs: run: | npm config set registry https://registry.npmmirror.com npm install --global vercel@latest - vercel telemetry disable - ls + npm i -g pnpm - name: Pull Vercel Environment Information run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts -- 2.54.0 From 17cfd9467f58de4cabff0a94bf09bcd8cc312e08 Mon Sep 17 00:00:00 2001 From: LufsX Date: Mon, 23 Dec 2024 01:36:40 +0800 Subject: [PATCH 7/7] feat: add Vercel production deployment workflow and install PNPM --- .gitea/workflows/dev_build.yaml | 2 +- .gitea/workflows/main_build.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/main_build.yaml diff --git a/.gitea/workflows/dev_build.yaml b/.gitea/workflows/dev_build.yaml index 900e67f..83f8424 100644 --- a/.gitea/workflows/dev_build.yaml +++ b/.gitea/workflows/dev_build.yaml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install Vercel CLI + - name: Install Vercel CLI and PNPM run: | npm config set registry https://registry.npmmirror.com npm install --global vercel@latest diff --git a/.gitea/workflows/main_build.yaml b/.gitea/workflows/main_build.yaml new file mode 100644 index 0000000..e436d09 --- /dev/null +++ b/.gitea/workflows/main_build.yaml @@ -0,0 +1,30 @@ +name: Vercel Production Deployment + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +on: + push: + branches: + - main + +jobs: + Deploy-Production: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Vercel CLI and PNPM + run: | + npm config set registry https://registry.npmmirror.com + npm install --global vercel@latest + npm i -g pnpm + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} -- 2.54.0