From f0b26978e162e7eca545b2794c2502457d39cc4b Mon Sep 17 00:00:00 2001 From: huangliling Date: Wed, 28 Aug 2024 16:11:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=B9=E7=94=A8=20netlify=20?= =?UTF-8?q?=E5=81=9A=E9=A2=84=E8=A7=88=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview-deletion.yml | 14 ------------ .github/workflows/preview-deployment.yml | 29 ------------------------ 2 files changed, 43 deletions(-) delete mode 100644 .github/workflows/preview-deployment.yml diff --git a/.github/workflows/preview-deletion.yml b/.github/workflows/preview-deletion.yml index 503dea9..10b6937 100644 --- a/.github/workflows/preview-deletion.yml +++ b/.github/workflows/preview-deletion.yml @@ -4,26 +4,12 @@ on: pull_request: types: [closed] -env: - REGION: cn-n1 # set this to your LeanCloud region, e.g. cn-n1 - APP_ID: j1sU6A4GIEiCzwDu5l9Klk03-9Nh9j0Va # set this to your App ID on LeanCloud - GROUP: web # set this to your group, e.g. web - jobs: delete-preview-environment: runs-on: ubuntu-latest permissions: deployments: write steps: - - name: Install lean-cli - run: | - sudo curl -L -o /bin/lean https://github.com/leancloud/lean-cli/releases/download/v1.2.3/lean-linux-x64 - sudo chmod +x /bin/lean - - name: Delete Preview Environment - run: | - lean login --region ${{ env.REGION }} --token ${{ secrets.LC_ACCESS_TOKEN }} - lean switch --region ${{ env.REGION }} --group ${{ env.GROUP }} ${{ env.APP_ID }} - lean preview delete - uses: strumwolf/delete-deployment-environment@v2 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/preview-deployment.yml b/.github/workflows/preview-deployment.yml deleted file mode 100644 index 7c70aa7..0000000 --- a/.github/workflows/preview-deployment.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Deploy Preview Environment - -on: - pull_request: - types: [opened, synchronize] - -env: - REGION: cn-n1 # set this to your LeanCloud region, e.g. cn-n1 - APP_ID: j1sU6A4GIEiCzwDu5l9Klk03-9Nh9j0Va # set this to your App ID on LeanCloud - GROUP: web # set this to your group, e.g. web - -jobs: - deploy-preview-environment: - runs-on: ubuntu-latest - environment: - name: preview/${{ github.head_ref }} - url: ${{ env.PREVIEW_URL }} - steps: - - uses: actions/checkout@v3 - - name: Install lean-cli - run: | - sudo curl -L -o /bin/lean https://github.com/leancloud/lean-cli/releases/download/v1.2.3/lean-linux-x64 - sudo chmod +x /bin/lean - - name: Deploy - run: | - lean login --region ${{ env.REGION }} --token ${{ secrets.LC_ACCESS_TOKEN }} - lean switch --region ${{ env.REGION }} --group ${{ env.GROUP }} ${{ env.APP_ID }} - PREVIEW_URL=$(lean preview deploy) - echo "PREVIEW_URL=$PREVIEW_URL" >> $GITHUB_ENV \ No newline at end of file