-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add concurrency directive to prevent simultaneous builds for a single branch. - Add a workflow to delete the web preview when a PR is closed.
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Delete Preview Build | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
pages: write | ||
pull-requests: write | ||
|
||
jobs: | ||
azure_blob: | ||
runs-on: ubuntu-latest | ||
env: | ||
AZURE_STORAGE_ACCOUNT: mappingseditor | ||
AZURE_STORAGE_SAS_TOKEN: ${{ secrets.AZURE_SAS_TOKEN }} | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
steps: | ||
- name: Install Azure CLI | ||
run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | ||
- name: Delete old blobs | ||
run: az storage blob delete-batch -s '$web' --pattern "$BRANCH_NAME/*" |
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