#109 Support for dev docs; canonical URLs #1
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: Trigger documentation publish | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ['docs/**'] | |
| tags: ['v*'] | |
| jobs: | |
| dispatch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fire repository_dispatch to site repo | |
| env: | |
| GH_TOKEN: ${{ secrets.DOCS_DISPATCH_TOKEN }} | |
| VERSION: ${{ github.ref_name }} | |
| run: | | |
| if [[ "$GITHUB_REF" == refs/tags/v* ]]; then | |
| VERSION_LABEL="${VERSION#v}" | |
| else | |
| VERSION_LABEL="dev" | |
| fi | |
| gh api repos/hardwood-hq/hardwood-hq.github.io/dispatches \ | |
| --field event_type=publish-docs \ | |
| --field client_payload="$(cat <<EOF | |
| { | |
| "source_ref": "${{ github.sha }}", | |
| "version": "$VERSION_LABEL", | |
| "update_latest": true | |
| } | |
| EOF | |
| )" |