File: generate-latest-docs.sh

package info (click to toggle)
google-auto-value-java 1.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 3,288 kB
  • sloc: java: 35,820; xml: 1,451; sh: 34; makefile: 10
file content (25 lines) | stat: -rwxr-xr-x 747 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

# Run by GitHub Actions (see .github/workflows/ci.yml)

set -e

echo -e "Publishing javadoc...\n"

mvn -f build-pom.xml javadoc:aggregate
TARGET="$(pwd)/target"

cd $HOME
git clone --quiet --branch=gh-pages "https://x-access-token:${GITHUB_TOKEN}@github.com/google/auto" gh-pages > /dev/null

cd gh-pages
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git rm -rf api/latest
mkdir -p api # Just to make mv work if the directory is missing
mv ${TARGET}/site/apidocs api/latest
git add -A -f api/latest
git commit -m "Latest javadoc on successful CI build auto-pushed to gh-pages"
git push -fq origin gh-pages > /dev/null

echo -e "Published Javadoc to gh-pages.\n"