diff --git a/.github/workflows/deploy-pr-checks.yml b/.github/workflows/deploy-pr-checks.yml index 62de10319..67c7765bf 100644 --- a/.github/workflows/deploy-pr-checks.yml +++ b/.github/workflows/deploy-pr-checks.yml @@ -98,13 +98,15 @@ jobs: interval: 500 - name: Generate Preview text run: | - echo "## PR Preview: + echo "## Live PR Preview: * [Map](https://preview.ourmap.us/pr/${{ env.PR_NUM }}/) * [Shield Test](https://preview.ourmap.us/pr/${{ env.PR_NUM }}/shieldtest.html) * [style.json](https://preview.ourmap.us/pr/${{ env.PR_NUM }}/style.json) * [shields.json](https://preview.ourmap.us/pr/${{ env.PR_NUM }}/shields.json) * [taginfo.json](https://preview.ourmap.us/pr/${{ env.PR_NUM }}/taginfo.json) + Live previews are automatically removed once the PR is merged. + ## Sprite Sheets: diff --git a/.github/workflows/s3-cleanup.yml b/.github/workflows/s3-cleanup.yml new file mode 100644 index 000000000..2e2f0b3ab --- /dev/null +++ b/.github/workflows/s3-cleanup.yml @@ -0,0 +1,27 @@ +name: Delete S3 Files on PR Merged + +on: + pull_request: + types: + - closed + +jobs: + delete-s3-files: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up AWS CLI + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + + - name: Remove files from S3 + run: | + PR_NUMBER=${{ github.event.pull_request.number }} + aws s3 rm s3://${{ secrets.AWS_S3_BUCKET }}/pr/${PR_NUMBER}/ --recursive diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index bc329f944..559024ac4 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -2169,6 +2169,8 @@ export function loadShields() { bottom: 5, }, }; + shields["US:SD:Business"] = banneredShield(shields["US:SD"], ["BUS"]); + shields["US:SD:Truck"] = banneredShield(shields["US:SD"], ["TRK"]); [ "Beadle", "Bon_Homme",