-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (51 loc) · 1.62 KB
/
deployWebSample.yml
File metadata and controls
62 lines (51 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Simple workflow for deploying Web SDK Sample to GitHub Pages
name: Deploy Web SDK Sample to Github Pages
on:
pull_request:
branches:
- 'main'
paths:
- 'web/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets the GITHUB_TOKEN permissions to allow comment on PRs
permissions:
contents: read
pull-requests: write
# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
web-sdk-sample-deploy:
runs-on: ubuntu-latest
env:
SAMPLE_DIR: web/samples/WordWiz
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '22.14.0'
- name: Enable pnpm
run: |
corepack enable
corepack use pnpm@10.8.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: ${{ env.SAMPLE_DIR }}
- name: Build
run: pnpm run build
working-directory: ${{ env.SAMPLE_DIR }}
- name: Publish Web SDK Sample Build
run: ./build/bin/upload-web-sdk-sample-build.sh
env:
GIT_WEB_SDK_SAMPLE_PAT: ${{ secrets.GIT_WEB_SDK_SAMPLE_PAT }}
SAMPLE_DIR: ${{ env.SAMPLE_DIR }}
- uses: github-actions-up-and-running/pr-comment@v1.0.1
if: ${{ github.event_name == 'pull_request' }}
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message: Web SDK Sample Build [link](https://beamable.github.io/web-sdk-sample/)