fix 老的 LC 文档地址失效并清除更换成新的 LC 文档地址 #340
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete Preview Environment | |
on: | |
pull_request: | |
types: [closed] | |
env: | |
REGION: cn-e1 | |
APP_ID: j1sU6A4GIEiCzwDu5l9Klk03-9Nh9j0Va | |
jobs: | |
delete-preview-environment: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
matrix: | |
group: [web, tds, intl] | |
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 | |
run: | | |
lean login --region ${{ env.REGION }} --token ${{ secrets.ACCESS_TOKEN }} | |
lean switch --region ${{ env.REGION }} --group ${{ matrix.group }} ${{ env.APP_ID }} | |
lean preview delete | |
- uses: strumwolf/delete-deployment-environment@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
environment: preview-${{ matrix.group }}/${{ github.head_ref }} | |
onlyDeactivateDeployments: true |