Skip to content

Merge pull request #1280 from algorandfoundation/automatic-pr-go-algo… #7

Merge pull request #1280 from algorandfoundation/automatic-pr-go-algo…

Merge pull request #1280 from algorandfoundation/automatic-pr-go-algo… #7

name: Trigger Documentation Build
on:
push:
branches:
- master
- staging
jobs:
trigger-build:
runs-on: ubuntu-latest
steps:
- name: Trigger documentation build
run: |
# Set environment based on branch
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
ENV="production"
else
ENV="staging"
fi
# Trigger repository_dispatch event
curl -X POST \
-H "Authorization: token ${{ secrets.DISPATCH_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"event_type\": \"docs_update\", \"client_payload\": {\"ref\": \"${{ github.ref }}\", \"environment\": \"$ENV\"}}" \
https://api.github.com/repos/algorandfoundation/algorand-developer-portal/dispatches