8
8
website :
9
9
runs-on : ubuntu-20.04
10
10
steps :
11
- - uses : actions/checkout@v2
12
- - uses : actions/setup-node@v2
11
+ - uses : actions/checkout@v3
12
+ - uses : actions/setup-node@v3
13
13
with :
14
- node-version : 14
14
+ node-version : 16
15
15
16
- - run : mkdir -p build build/example
17
- - run : cp -rp example build/example
16
+ - run : npm run build
17
+ - run : mkdir -p dist dist/example
18
+ - run : cp -rp example dist/example
18
19
# - run: npm i markdown-to-html-cli -g
19
20
# - run: markdown-to-html --output build/index.html
20
21
21
22
- name : Generate Contributors Images
22
23
uses : jaywcjlove/github-action-contributors@main
23
24
with :
24
25
filter-author : (renovate\[bot\]|renovate-bot|dependabot\[bot\])
25
- output : build /CONTRIBUTORS.svg
26
+ output : dist /CONTRIBUTORS.svg
26
27
avatarSize : 42
27
28
28
- - name : Converts Markdown to HTML
29
- uses : jaywcjlove/markdown-to-html-cli@main
29
+ - name : Create Tag
30
+ id : create_tag
31
+ uses :
jaywcjlove/[email protected]
30
32
with :
31
- source : README.md
32
- output : build/index.html
33
+ package-path : ./package.json
34
+
35
+ - name : get tag version
36
+ id : tag_version
37
+ uses :
jaywcjlove/[email protected]
33
38
34
39
- name : Deploy
35
40
uses : peaceiris/actions-gh-pages@v3
36
41
with :
42
+ user_name : ' github-actions[bot]'
43
+ user_email : ' github-actions[bot]@users.noreply.github.com'
44
+ commit_message : ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
37
45
github_token : ${{ secrets.GITHUB_TOKEN }}
38
- publish_dir : ./build
46
+ publish_dir : ./dist
47
+
48
+ - name : Generate Changelog
49
+ id : changelog
50
+ uses :
jaywcjlove/[email protected]
51
+ with :
52
+ token : ${{ secrets.GITHUB_TOKEN }}
53
+ filter-author : (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
54
+ filter : (^[\s]+?[R|r]elease)|(^[R|r]elease)
55
+
56
+ - name : Create Release
57
+ uses : ncipollo/release-action@v1
58
+ if : steps.create_tag.outputs.successful
59
+ with :
60
+ token : ${{ secrets.GITHUB_TOKEN }}
61
+ name : ${{ steps.create_tag.outputs.version }}
62
+ tag : ${{ steps.create_tag.outputs.version }}
63
+ body : |
64
+ Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/golang-tutorial/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
65
+ Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
66
+
67
+ ${{ steps.changelog.outputs.changelog }}
0 commit comments