File tree Expand file tree Collapse file tree 3 files changed +31
-12
lines changed Expand file tree Collapse file tree 3 files changed +31
-12
lines changed Original file line number Diff line number Diff line change 5151 needs :
5252 - build
5353 runs-on : ubuntu-latest
54+ outputs :
55+ release-status : ${{ env.release_status }}
5456 # Release only where secrets are available.
5557 if : >-
5658 !github.event.repository.fork
7678 run : |
7779 npm install
7880 npx semantic-release
81+ documentation-deploy :
82+ needs :
83+ - release
84+ runs-on : ubuntu-latest
85+ # Update documentation only when there is a new release
86+ if : needs.release.outputs.release-status == released
87+ steps :
88+ - name : Checkout the repository
89+ uses : actions/checkout@v3
90+ with :
91+ submodules : recursive
92+ fetch-depth : 0
93+ - name : Generate Documentation
94+ run : ./gradlew dokkaHtml
95+ - name : Deploy documentation on GitHub Pages
96+ uses : peaceiris/actions-gh-pages@v3
97+ with :
98+ github_token : ${{ secrets.GITHUB_TOKEN }}
99+ keep_files : true
100+ publish_dir : ./build/dokka/html
101+ user_name : ' github-actions[bot]'
102+ user_email : ' github-actions[bot]@users.noreply.github.com'
103+ commit_message : ' docs: update documentation'
79104 success :
80105 runs-on : ubuntu-22.04
81106 needs :
Original file line number Diff line number Diff line change 11{
22 "devDependencies" : {
3- "semantic-release-preconfigured-conventional-commits" : " 1.1.16" ,
4- "@qiwi/semrel-metabranch" : " 3.1.3"
3+ "semantic-release-preconfigured-conventional-commits" : " 1.1.16"
54 },
65 "engines" : {
76 "node" : " 18.13"
Original file line number Diff line number Diff line change 11// Load this configuration that provide all the base for working with conventional commits
22const config = require ( 'semantic-release-preconfigured-conventional-commits' )
33
4- // Commands executed during release
4+ /*
5+ Commands executed during release.
6+ It also set an environment variable "release" indicating that the release was successful.
7+ */
58const publishCommands = `
69git tag -a -f \${nextRelease.version} \${nextRelease.version} -F CHANGELOG.md || exit 2
710git push --force origin \${nextRelease.version} || exit 3
11+ echo "release_status=released" >> $GITHUB_ENV
812`
913// Only release on branch main
1014const releaseBranches = [ "main" ]
@@ -23,15 +27,6 @@ config.plugins.push(
2327 [ "@semantic-release/git" , {
2428 "assets" : [ "CHANGELOG.md" , "package.json" ] ,
2529 "message" : "chore(release)!: [skip ci] ${nextRelease.version} released"
26- } ] ,
27- [ "@qiwi/semrel-metabranch" , {
28- "publish" : {
29- "action" : "push" ,
30- "from" : "build/dokka" ,
31- "to" : "." ,
32- "branch" : "gh-pages" ,
33- "message" : "docs: ${nextRelease.version} documentation released"
34- }
3530 } ]
3631)
3732
You can’t perform that action at this time.
0 commit comments