xref: /OpenGrok/.github/workflows/javadoc.yml (revision 70b5b62bbc182e444518d2ca8d2f6551452a7b9d)
1efc06f38SVladimir Kotalname: Upload javadocs to Github pages
2efc06f38SVladimir Kotal
3007e46f6SVladimir Kotalon:
4007e46f6SVladimir Kotal  push:
5007e46f6SVladimir Kotal    branches:
6007e46f6SVladimir Kotal    - master
7ef479220SVladimir Kotal    paths:
8ef479220SVladimir Kotal    - opengrok-indexer/**
9ef479220SVladimir Kotal    - opengrok-web/**
10ef479220SVladimir Kotal    - suggester/**
11ef479220SVladimir Kotal    - plugins/**
1264046f2dSVladimir Kotal    - .github/workflows/javadoc.yml
1364046f2dSVladimir Kotal    - dev/javadoc.sh
14efc06f38SVladimir Kotal
15efc06f38SVladimir Kotaljobs:
16efc06f38SVladimir Kotal  ubuntu:
17efc06f38SVladimir Kotal    runs-on: ubuntu-latest
18efc06f38SVladimir Kotal    steps:
19efc06f38SVladimir Kotal    - name: Checkout master branch
20efc06f38SVladimir Kotal      uses: actions/checkout@v2
21efc06f38SVladimir Kotal    - name: Set up JDK 11
22efc06f38SVladimir Kotal      uses: actions/setup-java@v1
23efc06f38SVladimir Kotal      with:
24efc06f38SVladimir Kotal        java-version: 11
25efc06f38SVladimir Kotal    - name: Cache Maven packages
26efc06f38SVladimir Kotal      uses: actions/cache@v2
27efc06f38SVladimir Kotal      with:
28efc06f38SVladimir Kotal        path: ~/.m2
29efc06f38SVladimir Kotal        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
30efc06f38SVladimir Kotal        restore-keys: ${{ runner.os }}-m2
3145e0b905SVladimir Kotal    - name: Checkout gh-pages branch
32*70b5b62bSVladimir Kotal      if: github.repository == 'oracle/opengrok'
3345e0b905SVladimir Kotal      uses: actions/checkout@v2
3445e0b905SVladimir Kotal      with:
3545e0b905SVladimir Kotal        ref: gh-pages
3645e0b905SVladimir Kotal        path: gh-pages
37efc06f38SVladimir Kotal    - name: Refresh Javadoc
3880a86e86SVladimir Kotal      env:
3980a86e86SVladimir Kotal        OPENGROK_REPO_SLUG: ${{ github.repository }}
4080a86e86SVladimir Kotal        OPENGROK_PULL_REQUEST: ${{ github.head_ref }}
4180a86e86SVladimir Kotal        OPENGROK_REF: ${{ github.ref }}
4280a86e86SVladimir Kotal        OPENGROK_BUILD_DIR: ${{ github.workspace }}
4375a76d7eSVladimir Kotal      run: ./dev/javadoc.sh
44