88 website :
99 runs-on : ubuntu-20.04
1010 steps :
11- - uses : actions/checkout@v2
12- - uses : actions/setup-node@v2
11+ - uses : actions/checkout@v3
12+ - uses : actions/setup-node@v3
1313 with :
14- node-version : 14
14+ node-version : 16
1515
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
1819 # - run: npm i markdown-to-html-cli -g
1920 # - run: markdown-to-html --output build/index.html
2021
2122 - name : Generate Contributors Images
2223 uses : jaywcjlove/github-action-contributors@main
2324 with :
2425 filter-author : (renovate\[bot\]|renovate-bot|dependabot\[bot\])
25- output : build /CONTRIBUTORS.svg
26+ output : dist /CONTRIBUTORS.svg
2627 avatarSize : 42
2728
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/create-tag-action@v1.3.7
3032 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/changelog-generator@v1.5.7
3338
3439 - name : Deploy
3540 uses : peaceiris/actions-gh-pages@v3
3641 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 }}
3745 github_token : ${{ secrets.GITHUB_TOKEN }}
38- publish_dir : ./build
46+ publish_dir : ./dist
47+
48+ - name : Generate Changelog
49+ id : changelog
50+ uses : jaywcjlove/changelog-generator@v1.5.7
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