Clarify Missing Number XOR intuition #28
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 Blog Deploy | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| dispatch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger justinmathew.com rebuild | |
| env: | |
| BLOG_REPO_DISPATCH_TOKEN: ${{ secrets.BLOG_REPO_DISPATCH_TOKEN }} | |
| GITHUB_SHA: ${{ github.sha }} | |
| run: | | |
| if [[ -z "$BLOG_REPO_DISPATCH_TOKEN" ]]; then | |
| echo "::warning::Missing BLOG_REPO_DISPATCH_TOKEN secret. Skipping blog deploy dispatch." | |
| echo "Create a fine-grained GitHub token with access to mathewjustin/justinmathew and Contents: Read and write, then save it as this repo secret." | |
| exit 0 | |
| fi | |
| curl --fail-with-body \ | |
| -X POST \ | |
| -H "Authorization: Bearer ${BLOG_REPO_DISPATCH_TOKEN}" \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| https://api.github.com/repos/mathewjustin/justinmathew/dispatches \ | |
| -d "{\"event_type\":\"leetcode-patterns-updated\",\"client_payload\":{\"source_repo\":\"${GITHUB_REPOSITORY}\",\"source_sha\":\"${GITHUB_SHA}\"}}" |