[actions] Setup workflow to publish docs/ to gh-pages #3
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 Docs | |
| on: | |
| push: | |
| branches: | |
| - 4.x-cuda | |
| paths: | |
| - 'docs/**' | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Update gh-pages Branch | |
| run: | | |
| cp -r docs docs-tmp | |
| git fetch origin gh-pages | |
| git checkout gh-pages | |
| git rm * -f -r --ignore-unmatch | |
| git add docs-tmp/ | |
| git mv docs-tmp/* . | |
| git commit -a -m "[docs] @${{ github.triggering_actor }}: Update Documentation" \ | |
| -m "Source: ${{ github.ref_name }} (${{ github.sha }})" \ | |
| git push |