-
Notifications
You must be signed in to change notification settings - Fork 62
55 lines (53 loc) · 1.39 KB
/
ci-workflow.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
50
51
52
53
54
55
name: ci
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- master
pull_request:
branches:
- '**'
jobs:
build:
# Job name is Greeting
name: build
# This job runs on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: corepack enable
- run: yarn install --immutable
- name: Build
run: yarn run build
- name: Run linter
run: yarn run lint
- name: Run tests
run: yarn run test
page:
needs: build
name: Cloudflare Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: corepack enable
- name: Install
run: yarn install --immutable
- name: Build
run: yarn build
env:
REACT_APP_SNAP_ID: 'npm:@chainsafe/polkadot-snap'
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 2238a825c5aca59233eab1f221f7aefb
projectName: metamask-snap-polkadot
directory: ./packages/example/build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref || github.ref_name }}