-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding CI/CD workflow for publishing packages
- Loading branch information
1 parent
3060e74
commit b7449fa
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Deploy Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Get the code | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
cache-dependency-path: '**/yarn.lock' | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
# This expects you to have a script called release which does a build for your packages and calls changeset publish | ||
publish: yarn release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
TURBO_TOKEN: ${{ secrets.VERCEL_UI_TOKEN }} | ||
TURBO_TEAM: brenocastelo | ||
|
||
- name: Deploy Storybook | ||
working-directory: ./packages/docs | ||
run: yarn deploy-storybook -- --ci --existing-output-dir=storybook-static | ||
env: | ||
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} | ||
|
||
|