-
Notifications
You must be signed in to change notification settings - Fork 132
53 lines (46 loc) · 1.57 KB
/
gamedistribution-build.yml
File metadata and controls
53 lines (46 loc) · 1.57 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
name: GameDistribution Build
on:
push:
branches-ignore:
- 'gh-pages'
- 'gh-pages-dev'
- 'coolmath-build'
- 'coolmath-build-*'
- 'gamedistribution-build'
- 'gamedistribution-build-*'
workflow_dispatch:
jobs:
build-gamedistribution:
runs-on: ubuntu-latest
env:
CI: false
NEXT_PUBLIC_GAMEDISTRIBUTION: true
NEXT_PUBLIC_API_URL: api.worldguessr.com
NEXT_PUBLIC_WS_HOST: server.worldguessr.com
NEXT_PUBLIC_GOOGLE_CLIENT_ID: 471080734176-vm588te8pig8tnmvi00b5hr143d64qjk.apps.googleusercontent.com
NEXT_PUBLIC_BASE_PATH: /fef00656129743768437b7589b7c48b1
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm i
- name: Build GameDistribution version
run: npm run build
- name: Get branch name
id: branch
run: |
BRANCH_NAME="${GITHUB_REF_NAME}"
# Sanitize branch name for use in git branch name
SAFE_BRANCH_NAME=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9_-]/-/g')
echo "name=$SAFE_BRANCH_NAME" >> $GITHUB_OUTPUT
echo "Building GameDistribution version for branch: $BRANCH_NAME"
- name: Deploy to GameDistribution build branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
publish_branch: gamedistribution-build-${{ steps.branch.outputs.name }}
commit_message: "GameDistribution build from ${{ github.sha }}"