Skip to content

Commit

Permalink
chore: re-work cleanup pipeline (#2869)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinbarron authored Nov 21, 2023
1 parent c3a3d82 commit 700f6ef
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions .github/workflows/pr-clean-deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
branches: [main, release/**, next/**]

jobs:
storybook:
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook')"
cleanup:
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook') || contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')"
runs-on: ubuntu-latest

strategy:
Expand All @@ -26,33 +26,20 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- run: |
- name: Setup git user
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Remove pr storybook deployment
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook')"
run: |
git rm -r next/pr/${{ github.event.number }}
git commit -m "PR ${{ github.event.number }} closed - remove storybook"
git push
react-contoso:
if: "contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')"
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- run: |
git config user.name github-actions
git config user.email [email protected]
- name: Remove pr test app deployment
if: "contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')"
run: |
git rm -r next/sample/pr/${{ github.event.number }}
git commit -m "PR ${{ github.event.number }} closed - remove react-contoso"
- name: Push changes
run: |
git push

0 comments on commit 700f6ef

Please sign in to comment.