Merge pull request #6 from eclipse-keyple/develop-2.0.1 #9
This file contains hidden or 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
| name: Publish API documentation (snapshot) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - doxygen | |
| jobs: | |
| publish-doc-snapshot: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository code from ${{ github.repository }}/${{ github.ref }} | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Make scripts executable | |
| run: chmod +x ./.github/scripts/*.sh | |
| - name: Check version | |
| working-directory: . | |
| run: ./.github/scripts/check_version.sh | |
| - name: Patch Doxyfile | |
| working-directory: . | |
| run: ./.github/scripts/patch_doxyfile.sh ${{ env.PROJECT_VERSION }} | |
| - name: Generate and prepare documentation | |
| uses: eclipse-keypop/keypop-actions/doxygen@f012732e75cdda39ba7b988533030493303700a5 | |
| with: | |
| repo-name: ${{ github.event.repository.name }} | |
| version: ${{ github.event.inputs.version || github.ref_name }} | |
| - name: Prepare Doxygen doc page locally | |
| working-directory: . | |
| run: ./.github/scripts/prepare_doxygen.sh ${{ env.PROJECT_VERSION }} | |
| - name: Deploy to doc branch | |
| run: | | |
| git config --global user.name "Eclipse Keypop Bot" | |
| git config --global user.email "${{ github.repository }}-bot@eclipse.org" | |
| cd ${{ github.event.repository.name }} | |
| git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| git add . | |
| git diff --quiet && git diff --staged --quiet || git commit -m "docs: update snapshot documentation" | |
| git push origin doc --force | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |