-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (67 loc) · 1.97 KB
/
deploy.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Deploy
on:
push:
branches:
- main
paths-ignore:
- .github/**
# manual trigger
workflow_dispatch:
jobs:
# Wait for up to a minute for previous run to complete, abort if not done by then
pre-run:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: 'Block Concurrent Executions'
uses: softprops/turnstyle@v1
with:
poll-interval-seconds: 10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
bump_version:
name: Bump Version
needs: pre-run
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.github_tag_action.outputs.new_tag }}
changelog: ${{ steps.github_tag_action.outputs.changelog }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Bump version and push tag
id: github_tag_action
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: master
fetch_all_tags: true
deploy:
name: Deploy
needs: pre-run
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.18.2'
- name: Install pnpm and dependencies
run: |
npm install -g [email protected]
pnpm install
- name: Build production
run: pnpm run build
- name: Deploy to Cloudflare Pages
if: github.ref == 'refs/heads/main'
uses: cloudflare/wrangler-action@v3
env:
projectName: governance-1inch-community
distDir: build
branch: main
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
accountId: e34eeb161ddd9fee77da1de105a9141b
packageManager: pnpm
command: pages deploy ${{ env.distDir }} --project-name=${{ env.projectName }} --branch=${{ env.branch }} --commit-dirty=true