generated from S-N-O-R-L-A-X/vite-react-ts-template
-
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.
- Loading branch information
1 parent
c5cda85
commit 938f017
Showing
3 changed files
with
58 additions
and
47 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,23 @@ | ||
name: art-component-deploy | ||
on: | ||
push: | ||
branches: | ||
- "main" # change to the branch you wish to deploy from | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.build-publish.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: build-publish | ||
uses: bitovi/[email protected] | ||
with: | ||
path: storybook-static # change to your build folder | ||
build_command: npm run build-storybook |
This file was deleted.
Oops, something went wrong.
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,35 @@ | ||
name: Npm publish | ||
on: | ||
push: | ||
tags: | ||
- "v*" # 这段的意思是仅在出现名为 v 字符开头的tag时,触发此任务,如v1.2.1 | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.2.0 | ||
- name: Install dependencies | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Add Npm Token # add access token to .npmrc | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ./.npmrc | ||
ls -al | ||
cat ./.npmrc | ||
- name: Publish to npm # publish to npm registry | ||
run: npm publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ART }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |