Update Canvas Documentation Context #10
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: Update Canvas Documentation Context | |
| on: | |
| schedule: | |
| # Every Monday at 10am UTC | |
| - cron: '0 10 * * 1' | |
| workflow_dispatch: # Allow manual triggering | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-context: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download Canvas SDK context | |
| run: | | |
| mkdir -p canvas-plugin-assistant/skills/canvas-sdk | |
| curl -sSL https://raw.githubusercontent.com/canvas-medical/documentation/refs/heads/main/sdk-context.txt \ | |
| -o canvas-plugin-assistant/skills/canvas-sdk/coding_agent_context.txt | |
| - name: Download FHIR API context | |
| run: | | |
| mkdir -p canvas-plugin-assistant/skills/fhir-api-client-development | |
| curl -sSL https://raw.githubusercontent.com/canvas-medical/documentation/refs/heads/main/fhir-context.txt \ | |
| -o canvas-plugin-assistant/skills/fhir-api-client-development/fhir_client_context.txt | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Commit and push if changes | |
| run: | | |
| git add canvas-plugin-assistant/skills/canvas-sdk/coding_agent_context.txt | |
| git add canvas-plugin-assistant/skills/fhir-api-client-development/fhir_client_context.txt | |
| # Check if there are changes to commit | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "Update Canvas documentation context [automated]" | |
| git push | |
| fi |