Skip to content

Commit

Permalink
Merge pull request #25 from roshan-labs/feat-search-page
Browse files Browse the repository at this point in the history
chore: 更新 cd
  • Loading branch information
gxmari007 authored Apr 22, 2023
2 parents 7f42f06 + 14940b8 commit 557ccdf
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/long-taxis-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@roshan-ui/nuxt': patch
'@roshan-ui/ui': patch
---

更新 cd
35 changes: 35 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
outputs:
docs: ${{ steps.build_docs.outputs.docs }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -30,10 +32,43 @@ jobs:
run: pnpm install

- name: Release
id: release
uses: changesets/action@v1
with:
publish: pnpm release
version: pnpm version-bump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Build docs
id: build_docs
if: steps.release.outputs.published == 'true'
run: |
pnpm --filter @roshan-ui/ui build-storybook
run: echo "docs=success" >> "$GITHUB_OUTPUT"
- name: Upload docs artifacts
if: steps.build_docs.conclusion == 'success'
uses: actions/upload-pages-artifact@v1
with:
path: packages/ui/storybook-static

deploy-docs:
name: Deploy docs
needs: publish
if: needs.publish.outputs.docs == 'success'
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: 📝 DOCS

on:
release:
types: [published]
tags:
- '*'

jobs:
build-docs:
Expand Down

0 comments on commit 557ccdf

Please sign in to comment.