We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbd7fd4 commit b5607b8Copy full SHA for b5607b8
1 file changed
.github/workflows/main.yml
@@ -3,8 +3,11 @@ on:
3
push:
4
tags:
5
- v*
6
+env:
7
+ PUBLISH_TAG: ${{ contains(github.ref_name, '-') && 'next' || 'latest' }}
8
+
9
jobs:
- Build-and-Publish:
10
+ Test-Build-Publish-Deploy:
11
runs-on: ubuntu-latest
12
permissions:
13
contents: write
@@ -24,11 +27,12 @@ jobs:
24
27
run: pnpm i --frozen-lockfile
25
28
26
29
- name: Build & Publish
- run: npm publish --access public --provenance
30
+ run: npm publish --access public --provenance --tag ${{ env.PUBLISH_TAG }}
31
env:
32
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33
- - name: Update document
34
+ - name: Deploy document
35
+ if: ${{ env.PUBLISH_TAG == 'latest' }}
36
uses: peaceiris/actions-gh-pages@v4
37
with:
38
publish_dir: ./docs
0 commit comments