Added tooltip UX to School variables(abbrev, desc, regex) #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates/Resets the gh-pages branch to the intended start state | |
name: "58-javadoc-pr: Update javadoc for a pr to main" | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'src/**' | |
- 'pom.xml' | |
- '.github/workflows/58-javadoc-pr.yml' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
get-pr-num: | |
name: Get PR Number | |
runs-on: ubuntu-latest | |
outputs: | |
pr_number: ${{ steps.get-pr-num.outputs.pr_number }} | |
branch_name: ${{ steps.get-branch-name.outputs.branch_name }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3.5.2 | |
with: | |
fetch-depth: 1 | |
token: ${{ github.token }} | |
- name: Get PR number | |
id: get-pr-num | |
run: | | |
echo "GITHUB_EVENT_PATH=${GITHUB_EVENT_PATH}" | |
pr_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | |
echo "pr_number=${pr_number}" | |
echo "pr_number=${pr_number}" >> "$GITHUB_OUTPUT" | |
- name: Figure out Branch name | |
id: get-branch-name | |
run: | | |
GITHUB_HEAD_REF="${GITHUB_HEAD_REF}" | |
echo GITHUB_HEAD_REF=${GITHUB_HEAD_REF} | |
GITHUB_REF_CLEANED=${GITHUB_REF/refs\/heads\//} | |
echo GITHUB_REF_CLEANED=${GITHUB_REF_CLEANED} | |
GITHUB_REF_CLEANED=${GITHUB_REF_CLEANED//\//-} | |
echo GITHUB_REF_CLEANED=${GITHUB_REF_CLEANED} | |
BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF_CLEANED}}" | |
echo "branch_name=${BRANCH}" | |
echo "branch_name=${BRANCH}" >> "$GITHUB_OUTPUT" | |
build-javadoc-for-this-pr: | |
name: Javadoc (PR ${{ matrix.value.number }}, Branch ${{ matrix.value.headRefName }}) | |
runs-on: ubuntu-latest | |
needs: [get-pr-num] | |
steps: | |
- name: Debugging output | |
run: | | |
echo "pr_number=${{needs.get-pr-num.outputs.pr_number}}" | |
echo "branch_name=${{needs.get-pr-num.outputs.branch_name}}" | |
- name: Checkout repo | |
uses: actions/checkout@v3.5.2 | |
with: | |
ref: ${{ needs.get-pr-num.outputs.branch_name }} | |
fetch-depth: 1 | |
token: ${{ github.token }} | |
- name: Set up Java (version from .java-version file) | |
uses: actions/setup-java@v3 | |
with: | |
distribution: semeru # See: https://github.com/actions/setup-java#supported-distributions | |
java-version-file: ./.java-version | |
- name: Build javadoc | |
run: mvn -DskipTests javadoc:javadoc | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: target/site/apidocs # The folder where mvn javadoc:javadoc outputs the javadoc files | |
clean: true # Automatically remove deleted files from the deploy branch | |
target-folder: prs/${{ needs.get-pr-num.outputs.pr_number }}/javadoc # The folder that we serve our javadoc files from | |