Skip to content

Commit

Permalink
🔧 chore: update ci cd config
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Sep 12, 2023
1 parent bf08277 commit 88cc678
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 29 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Surge PR Preview

on:
on:
pull_request:

workflow_dispatch:
Expand All @@ -11,19 +11,18 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install bun
uses: oven-sh/setup-bun@v1

- name: Install deps
run: bun i

- uses: afc163/surge-preview@v1
id: preview_step
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
build: |
pnpm i
pnpm run docs:preview
build: bun run docs:preview
dist: docs-dist

- name: Get the preview_url
Expand Down
29 changes: 8 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,14 @@ jobs:
with:
token: ${{ secrets.CI_GITHUB_TOKEN }}

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install bun
uses: oven-sh/setup-bun@v1

- name: Install deps
run: pnpm install
run: bun i

- name: Test
run: pnpm run test
run: bun run test

release:
needs: test
Expand All @@ -41,21 +34,15 @@ jobs:
with:
token: ${{ secrets.CI_GITHUB_TOKEN }}

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install bun
uses: oven-sh/setup-bun@v1

- name: Install deps
run: pnpm install
run: bun i

- name: release
run: pnpm run release
run: bun run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 88cc678

Please sign in to comment.