Skip to content

Merge pull request #21 from 1inch/LAND-780 #14

Merge pull request #21 from 1inch/LAND-780

Merge pull request #21 from 1inch/LAND-780 #14

Workflow file for this run

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/checkout@v4.1.6
- name: Bump version and push tag
id: github_tag_action
uses: mathieudutour/github-tag-action@v6.2
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 pnpm@8.8.0
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