diff --git a/.github/workflows/webchannel-deploy-message-generator.yml b/.github/workflows/webchannel-deploy-message-generator.yml new file mode 100644 index 0000000..5ba80a8 --- /dev/null +++ b/.github/workflows/webchannel-deploy-message-generator.yml @@ -0,0 +1,53 @@ +name: Deploy WebChannel Message Generator Demo to GitHub Pages + +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Setup Node.js + uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + with: + node-version: 20 + + - name: Install dependencies and Build Demo + run: | + cd webchannel/js/demo + npm ci + npm run build + + - name: Prepare site directory + run: | + mkdir -p _site/webchannel/message_generator + cp -r webchannel/js/demo/index.html webchannel/js/demo/dist _site/webchannel/message_generator/ + + - name: Setup Pages + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 + + - name: Upload Artifact + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + with: + path: '_site' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 diff --git a/webchannel/js/demo/index.html b/webchannel/js/demo/index.html index 8e2d248..fd019fa 100644 --- a/webchannel/js/demo/index.html +++ b/webchannel/js/demo/index.html @@ -99,6 +99,6 @@