File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 3
3
name : Deploy VitePress site to Pages
4
4
5
5
on :
6
- # Runs on pushes targeting the `main` branch. Change this to `master` if you're
7
- # using the `master` branch as the default branch.
8
6
push :
9
7
branches : [main]
8
+ paths :
9
+ - ' package.json'
10
+ - ' package-lock.json'
11
+ - ' docs/**'
10
12
11
- # Allows you to run this workflow manually from the Actions tab
13
+ # Allows to run this workflow manually from the Actions tab
12
14
workflow_dispatch :
13
15
14
16
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Original file line number Diff line number Diff line change @@ -22,13 +22,17 @@ jobs:
22
22
run : npm run test
23
23
- name : Prepack
24
24
run : npm run prepack
25
+ # Configure Git for automated commits
25
26
- name : Configuring Git
26
27
run :
git config --global user.name "GitHub CD bot" && git config --global user.email "[email protected] "
28
+ # Bump package version
27
29
- name : Update package version
28
30
run : npm --no-git-tag-version version ${{ github.event.release.tag_name }}
29
- # - name: Publish package to NPM
30
- # run: npm publish
31
- # env:
32
- # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31
+ # Publish package to NPM
32
+ - name : Publish package to NPM
33
+ run : npm publish
34
+ env :
35
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
36
+ # Push changes to GitHub (package.json and package-lock.json)
33
37
- name : Push changes to GitHub
34
38
run : git commit -am "Release ${{ github.event.release.tag_name }}" && git push origin HEAD:main
Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
+ paths :
8
+ - ' package.json'
9
+ - ' package-lock.json'
10
+ - ' src/**'
11
+ - ' test/**'
12
+ - ' playground/**'
7
13
pull_request :
8
14
branches :
9
15
- main
16
+ paths :
17
+ - ' package.json'
18
+ - ' package-lock.json'
19
+ - ' src/**'
20
+ - ' test/**'
21
+ - ' playground/**'
10
22
11
23
jobs :
12
24
publish :
You can’t perform that action at this time.
0 commit comments