Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/webchannel-deploy-message-generator.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion webchannel/js/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ <h3 style="margin: 0;">Connection Logs</h3>
<textarea id="log" readonly></textarea>
</div>

<script src="dist/demo.js"></script>
<script src="dist/message_generator.js"></script>
</body>
</html>
File renamed without changes.
8 changes: 4 additions & 4 deletions webchannel/js/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "webchannel-ts-demo",
"name": "webchannel-message-generator-demo",
"version": "1.0.0",
"description": "TypeScript Web Demo for WebChannel",
"description": "TypeScript Web Message Generator Demo for WebChannel",
"scripts": {
"build": "esbuild demo.ts --bundle --outfile=dist/demo.js --platform=browser",
"start": "esbuild demo.ts --bundle --outfile=dist/demo.js --platform=browser && node server.js"
"build": "esbuild message_generator.ts --bundle --outfile=dist/message_generator.js --platform=browser",
"start": "esbuild message_generator.ts --bundle --outfile=dist/message_generator.js --platform=browser && node server.js"
},
"devDependencies": {
"esbuild": "^0.25.12"
Expand Down
Loading