-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (42 loc) · 1.38 KB
/
playground.yaml
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
name: playground
on:
push:
branches:
- main
jobs:
playground:
runs-on: ubuntu-20.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Enable Corepack
run: corepack enable
- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Install dependencies and build
working-directory: ./examples/sdk-demo-example
env:
BASE_PATH: /accelbyte-typescript-sdk
VITE_MODE: ${{ vars.VITE_MODE }}
VITE_SDK_BASE_URL: ${{ secrets.VITE_SDK_BASE_URL }}
VITE_CLIENT_ID: ${{ secrets.VITE_CLIENT_ID }}
VITE_NAMESPACE: ${{ secrets.VITE_NAMESPACE }}
VITE_REDIRECT_URI: ${{ secrets.VITE_REDIRECT_URI }}
run: |
yarn
yarn build
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./examples/sdk-demo-example/dist
# Publish only with the latest commit.
# Source: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-force-orphan-force_orphan.
force_orphan: true