[ref] create component result card #5
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: Cleanup on PR close | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
environment: Preview | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- 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: Cleanup Preview before deploy | |
run: vercel ls -m PR_NUMBER=${{ github.event.number }} --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*' | xargs -I {} vercel remove --scope podcodar {} --token=${{ secrets.VERCEL_TOKEN }} --yes |