-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (63 loc) · 2.36 KB
/
Copy pathdeploy-playground.yml
File metadata and controls
77 lines (63 loc) · 2.36 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
72
73
74
75
76
77
name: Deploy Playground
on:
push:
branches: [main]
workflow_dispatch:
inputs:
environment:
description: bulletin-deploy environment to publish to (blank = CLI default)
type: choice
default: ""
options:
- ""
- paseo-next-v2
- preview
- paseo-next
- paseo-review
concurrency:
group: deploy-truapi-playground
cancel-in-progress: false
permissions:
contents: read
jobs:
deploy-playground:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
- uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # stable
with:
toolchain: stable
- uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly
with:
toolchain: nightly
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Build @parity/truapi
run: npm ci && ./scripts/codegen.sh
- name: Install playground dependencies
working-directory: playground
run: yarn install --frozen-lockfile
- name: Cache Next.js build
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: playground/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}-${{ hashFiles('playground/src/**', 'playground/scripts/**', 'playground/public/**', 'playground/next.config.js', 'playground/tsconfig.json', 'playground/package.json') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}-
- name: Build playground
working-directory: playground
run: yarn build
- name: Install bulletin-deploy
run: npm install -g bulletin-deploy
- name: Deploy to DotNS
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
env:
BULLETIN_ENV: ${{ inputs.environment }}
with:
timeout_minutes: 10
max_attempts: 3
command: cd playground && bulletin-deploy ./out truapi-playground.dot --js-merkle ${BULLETIN_ENV:+--env "$BULLETIN_ENV"}