release: version 9.0.0 (#192) #103
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
name: Generate and Deploy Documentation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
check-version: | |
name: Check if the version has been updated | |
outputs: | |
has_changed: ${{ steps.check.outputs.has_changed }} | |
version: ${{ steps.versions.outputs.new_version }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- id: versions | |
run: | | |
PREV_VERSION=$(git show HEAD^:VERSION) | |
NEW_VERSION=$(git show HEAD:VERSION) | |
echo "prev_version=${PREV_VERSION}" >> $GITHUB_OUTPUT | |
echo "new_version=${NEW_VERSION}" >> $GITHUB_OUTPUT | |
shell: bash | |
- uses: aica-technology/.github/.github/actions/compare-versions@v0.11.0 | |
id: check | |
with: | |
previous_version: ${{ steps.versions.outputs.prev_version }} | |
new_version: ${{ steps.versions.outputs.new_version }} | |
deploy: | |
needs: check-version | |
name: Generate and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate docs | |
uses: mattnotmitt/doxygen-action@v1.9 | |
with: | |
working-directory: 'doxygen' | |
doxyfile-path: 'doxygen.conf' | |
- name: Tag version | |
shell: bash | |
run: | | |
mkdir -p doxygen/docs/versions | |
sudo mv doxygen/docs/html doxygen/docs/versions/rolling | |
if [ ${{ needs.check-version.outputs.has_changed }} = 'true' ]; then | |
sudo cp -r doxygen/docs/versions/rolling doxygen/docs/versions/latest | |
sudo cp -r doxygen/docs/versions/rolling doxygen/docs/versions/${{ needs.check-version.outputs.version }} | |
fi | |
- name: Deploy to documentation branch | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: docs | |
publish_dir: ./doxygen/docs | |
keep_files: true |