Skip to content

Commit

Permalink
feat(ITSM-105): update deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
AVEROMA committed Jul 9, 2024
1 parent a211a29 commit 2ea9b16
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 62 deletions.
61 changes: 21 additions & 40 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,55 +41,36 @@ jobs:
release_branches: master
fetch_all_tags: true

create_release:
name: Create Release
deploy:
name: Deploy
needs: pre-run
runs-on: ubuntu-latest
needs: bump_version
if: ${{ needs.bump_version.outputs.new_tag != null }}
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
with:
submodules: recursive
- name: Clone repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v3
with:
node-version: '16.17.1'

- name: Install yarn
run: npm install --global yarn

- name: Cache dependencies
uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
- name: Install pnpm and dependencies
run: |
yarn
yarn install --frozen-lockfile
npm install -g [email protected]
pnpm install
- name: Build
run: |
yarn run build
- name: Build production
run: pnpm run build

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: build # The folder the action should deploy.

- name: Create GitHub Release
id: create_release
uses: actions/[email protected]
- name: Deploy to Cloudflare Pages
if: github.ref == 'refs/heads/staging'
uses: cloudflare/wrangler-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
projectName: governance-1inch-community
distDir: build
branch: main
with:
tag_name: ${{ needs.bump_version.outputs.new_tag }}
release_name: Release ${{ needs.bump_version.outputs.new_tag }}
body: |
New version ${{ needs.bump_version.outputs.new_tag }}
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
30 changes: 8 additions & 22 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,18 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Clone source code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Clone repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '16.17.1'

- name: Install yarn
run: npm install --global yarn

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
- name: Install pnpm and dependencies
run: |
yarn
yarn install --frozen-lockfile
npm install -g [email protected]
pnpm install
- name: Build
run: |
yarn run build
- name: Build production
run: pnpm run build

0 comments on commit 2ea9b16

Please sign in to comment.