README edits and site update #697
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: API documentation | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| on: | |
| release: | |
| types: [published] | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/**' | |
| - 'include/**' | |
| - 'css/**' | |
| - 'resources/**' | |
| - 'Doxyfile' | |
| - '*.md' | |
| - '.github/workflows/dox.yml' | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'include/**' | |
| - 'css/**' | |
| - 'resources/**' | |
| - 'Doxyfile' | |
| - '*.md' | |
| - '.github/workflows/dox.yml' | |
| jobs: | |
| apidocs: | |
| name: Generate API documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: install doxygen | |
| run: sudo apt-get install doxygen | |
| - name: Check out RedisX | |
| uses: actions/checkout@v6 | |
| - name: Generate docs | |
| run: make dox | |
| site-update: | |
| name: Update github pages | |
| needs: apidocs | |
| if: github.repository_owner == 'Sigmyne' && (github.event_name == 'release' || contains(github.event.head_commit.message, 'site update')) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: install doxygen | |
| run: sudo apt-get install doxygen | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - name: Check out xchange | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: Sigmyne/xchange | |
| path: xchange | |
| - name: Generate docs | |
| run: make -C xchange dox | |
| - name: Generate headless README for RedisX | |
| run: make -C doc README.md | |
| - name: Link to xchange documentation | |
| run: | | |
| sed -i "s:TAGFILES =:TAGFILES =../xchange/doc/xchange.tag=/xchange/apidoc/html:g" doc/Doxyfile | |
| - name: Generate RedisX apidocs | |
| uses: mattnotmitt/doxygen-action@edge | |
| with: | |
| additional-packages: font-roboto | |
| working-directory: 'doc' | |
| - name: Insert Google analytics tracker | |
| run: for file in doc/html/*.html ; do sudo sed -i "/<\/head>/e cat resources/analytics.html" $file ; done | |
| - name: Checkout gh-pages | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: 'gh-pages' | |
| path: site | |
| - name: Assert site/doc/ | |
| run: mkdir -p site/doc | |
| - name: Copy CHANGELOG | |
| run: cp CHANGELOG.md site/doc/ | |
| - name: Copy README | |
| run: cp doc/README.md site/doc/README.md | |
| - name: Copy API documentation | |
| run: cp -a doc site/apidoc | |
| - name: Push to pages | |
| run: | | |
| cd site | |
| git config --global user.email "$GITHUB_JOB+github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions" | |
| git add -A | |
| git commit -m "[automated site update]" && git push || true | |
| changelog-update: | |
| name: Update CHANGELOG on github pages | |
| if: github.repository_owner == 'Sigmyne' && contains(github.event.head_commit.message, 'changelog update') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - name: Checkout gh-pages | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: 'gh-pages' | |
| path: site | |
| - name: Assert site/doc/ | |
| run: mkdir -p site/doc | |
| - name: Copy CHANGELOG | |
| run: cp CHANGELOG.md site/doc/ | |
| - name: Push to pages | |
| run: | | |
| cd site | |
| git config --global user.email "$GITHUB_JOB+github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions" | |
| git add -A | |
| git commit -m "[automated site update]" && git push || true |