Skip to content

Commit

Permalink
Add index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
HamaWhiteGG committed Oct 7, 2023
1 parent f151ee6 commit 10cd0ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/maven-javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- name: Deploy to gh-pages
run: |
echo "Listing all directories containing target/site/apidocs"
echo "<html><body><ul>" > /tmp/javadoc/index.html
for dir in $(find . -type d -path '*target/site/apidocs'); do
echo "Processing $dir"
# Remove the prefix './' and suffix 'target/site/apidocs', to get relative path of module
Expand All @@ -44,7 +45,9 @@ jobs:
mkdir -p "/tmp/javadoc/${parent_dir}"
# Copy Javadoc to corresponding directory
cp -R "$dir/"* "/tmp/javadoc/${parent_dir}"
echo "<li><a href='${parent_dir}index.html'>${parent_dir}</a></li>" >> /tmp/javadoc/index.html
done
echo "</ul></body></html>" >> /tmp/javadoc/index.html
git config --global user.name "HamaWhiteGG"
git config --global user.email "baisongxx@gmail.com"
git checkout --orphan gh-pages
Expand All @@ -53,6 +56,8 @@ jobs:
cp -R /tmp/javadoc/* .
git add .
git commit -m "Update Javadoc" || true
# Make sure "Read and write permissions" are enabled in Settings -> Actions -> General -> Workflow permissions
git push origin gh-pages --force
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

0 comments on commit 10cd0ad

Please sign in to comment.