diff --git a/.github/workflows/deploy-build-on-pr.yml b/.github/workflows/add-pr-demo.yml similarity index 74% rename from .github/workflows/deploy-build-on-pr.yml rename to .github/workflows/add-pr-demo.yml index 738eeee380..470474d788 100644 --- a/.github/workflows/deploy-build-on-pr.yml +++ b/.github/workflows/add-pr-demo.yml @@ -1,11 +1,11 @@ -name: Deploy build on pull request +name: Add PR Demo on: pull_request: types: [opened, synchronize] jobs: - deploy-build-on-pr: + add-pr-demo: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -24,6 +24,7 @@ jobs: npm run build-css npm run build-benchmarks npm run generate-typings + cp test/integration/pr-demo/index.html dist/index.html - name: Empty postinstall.js run: | @@ -43,6 +44,6 @@ jobs: - name: Add comment uses: marocchino/sticky-pull-request-comment@v2 with: - header: build + header: pr-demo message: | - Build output available at and . + Uploaded [build output](https://github.com/wipfli/maplibre-gl-js/tree/gh-pages/pulls/${{ github.event.number }}) and created a [live demo](https://maplibre.org/maplibre-gl-js/pulls/${{ github.event.number }}). diff --git a/.github/workflows/remove-build-on-pr.yml b/.github/workflows/remove-pr-demo.yml similarity index 74% rename from .github/workflows/remove-build-on-pr.yml rename to .github/workflows/remove-pr-demo.yml index 1a071eaeed..f83e1ccecb 100644 --- a/.github/workflows/remove-build-on-pr.yml +++ b/.github/workflows/remove-pr-demo.yml @@ -1,11 +1,11 @@ -name: Remove Build on Pull Request +name: Remove PR Demo on: pull_request: types: [closed] jobs: - remove-build-on-pull-request: + remove-pr-demo: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -24,6 +24,6 @@ jobs: - name: Add comment uses: marocchino/sticky-pull-request-comment@v2 with: - header: build + header: pr-demo message: | - Build output was removed from . + Removed build output and live demo. diff --git a/test/integration/pr-demo/index.html b/test/integration/pr-demo/index.html new file mode 100644 index 0000000000..bb53185e1f --- /dev/null +++ b/test/integration/pr-demo/index.html @@ -0,0 +1,26 @@ + + + + +Display a map + + + + + + +
+ + + +