-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (58 loc) · 1.91 KB
/
ci.yml
File metadata and controls
71 lines (58 loc) · 1.91 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
63
64
65
66
67
68
69
70
71
# This workflow will do a clean installation of Node dependencies, build the source code and run tests across different versions of Node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Run Tests
permissions:
contents: read
on:
push:
branches: [main, next]
pull_request:
branches: [main]
schedule:
- cron: "55 */12 * * *"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24]
env:
TRANSIFEX_SECRET: ${{ secrets.TRANSIFEX_SECRET }}
TRANSIFEX_TOKEN: ${{ vars.TRANSIFEX_TOKEN }}
steps:
- uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install
# Run scheduled tests on the latest version of the game, on push - on commited in all.meta.json
- name: Fetch fixtures
run: |
pnpm fetch:builds
if [ "$GITHUB_EVENT_NAME" == "schedule" ]; then
pnpm fetch:fixtures:nightly
else
pnpm fetch:fixtures
fi
- name: Verify & Test
run: pnpm test
- name: Build
env:
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
run: pnpm build
- name: Upload Translation Strings
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && env.TRANSIFEX_SECRET != ''
run: pnpm i18n:push
- name: Deploy 🚀
if: github.event_name == 'push' && false
uses: cloudflare/pages-action@v1
with:
accountId: 6f45d2e990c24e26aafd1513de56d82d
projectName: cbn-guide
directory: dist
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}