-
Notifications
You must be signed in to change notification settings - Fork 3.5k
50 lines (44 loc) · 1.34 KB
/
farmConfig.yml
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
name: Farm Config
on:
push:
branches:
- develop
paths:
- 'packages/farms/constants/**'
- 'packages/tokens/**'
- '!packages/tokens/src/common.ts'
- '!packages/tokens/src/helpers.ts'
- '!packages/tokens/src/index.ts'
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
env:
HAVE_CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN != '' }}
name: Publish Farm Config to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install dependencies
uses: './.github/actions/install-deps'
- name: Build package
run: pnpm build:packages
- name: Test
run: pnpm test:config
- name: Build list
run: pnpm turbo run build --filter=@pancakeswap/farms
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
if: ${{ env.HAVE_CLOUDFLARE_TOKEN == 'true' }}
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: b82548875bdb333ff5edcca4d076f88d
projectName: farms-config
directory: ./packages/farms/lists
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name == 'develop' && 'main' || null }}