File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 3333 env :
3434 GITHUB_ACTOR : ${{ github.actor }}
3535 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36+
37+ - name : Determine version from release tag
38+ id : get_version
39+ run : |
40+ RAW_VERSION="${{ github.event.release.tag_name }}"
41+ VERSION="${RAW_VERSION#v}"
42+ echo "VERSION=$VERSION" >> $GITHUB_ENV
43+
44+ - name : Generate JavaDoc with Gradle
45+ run : |
46+ chmod +x gradlew
47+ ./gradlew javadoc
48+
49+ - name : Deploy JavaDoc to gh-pages
50+ run : |
51+ git config user.name "GitHub Actions"
52+ git config user.email "[email protected] " 53+
54+ # Fetch + switch to gh-pages branch
55+ git checkout gh-pages
56+ git pull origin gh-pages
57+
58+ mkdir -p "javadocs/s2/${VERSION}"
59+ cp -r s2/build/docs/javadoc/* "javadocs/s2/${VERSION}"
60+
61+ mkdir -p "javadocs/s2-internal/${VERSION}"
62+ cp -r s2-internal/build/docs/javadoc/* "javadocs/s2-internal/${VERSION}"
63+
64+ git add "javadocs/s2/${VERSION}"
65+ git add "javadocs/s2-internal/${VERSION}"
66+ git commit -m "Add JavaDoc for version ${VERSION}" || echo "No changes to commit"
67+
68+ git push origin gh-pages
You can’t perform that action at this time.
0 commit comments