-
Notifications
You must be signed in to change notification settings - Fork 0
Update deploy workflow and add VSCode/Neovim docs #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Main
Are you sure you want to change the base?
Conversation
Expanded deploy workflow to support both 'main' and 'Main' branches and improved secret/environment variable syntax. Added VSCode workspace color settings and a Neovim quick reference markdown doc. Minor updates to README and package.json, and fixed script path in sync-secrets.sh.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
api-documentation-workflow | 764f0f3 | Sep 30 2025, 03:29 AM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates deployment workflow configuration and adds development tools documentation while fixing script paths and improving secret synchronization logic.
- Enhanced GitHub Actions workflow to support both 'main' and 'Main' branch triggers with corrected environment variable syntax
- Improved secret synchronization script with safer .env parsing and better dry-run handling
- Added comprehensive README documentation and VSCode workspace configuration
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/sync-secrets.sh | Fixed file paths and improved .env parsing with safer dry-run logic |
| package.json | Added wrangler as development dependency |
| README.md | Added comprehensive documentation for setup, deployment, and troubleshooting |
| .vscode/settings.json | Added VSCode workspace color customization settings |
| .github/workflows/deploy.yml | Fixed environment variable syntax and added 'Main' branch support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| trimmed="${line#${line%%[![:space:]]*}}" # remove leading | ||
| trimmed="${trimmed%${trimmed##*[![:space:]]}}" # remove trailing |
Copilot
AI
Sep 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whitespace trimming logic uses complex parameter expansion that is hard to read and maintain. Consider using a simpler approach like trimmed=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') or the built-in read command with IFS manipulation for better readability.
| trimmed="${line#${line%%[![:space:]]*}}" # remove leading | |
| trimmed="${trimmed%${trimmed##*[![:space:]]}}" # remove trailing | |
| trimmed=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') |
| SECRETS_MAP: ${{ github.ref_name == 'staging' && 'secrets.map.staging.json' || 'secrets.map.json' }} | ||
| # DRY_RUN from workflow input | ||
| DRY_RUN: $ github.event.inputs.dry_run | ||
| DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run || 'false' }} |
Copilot
AI
Sep 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logical OR operator || in GitHub Actions expressions will always evaluate to 'false' when github.event.inputs.dry_run is falsy, but this doesn't handle the case where the workflow is triggered by push events (where github.event.inputs.dry_run is undefined). Use a ternary operator instead: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run || '' }}
| DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run || 'false' }} | |
| DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run || github.event_name != 'workflow_dispatch' && 'false' }} |
| - name: Deploy (Cloudflare Workers) | ||
| if: $ github.event.inputs.dry_run != 'true' && github.event.inputs.dry_run != '1' | ||
| if: ${{ !(github.event_name == 'workflow_dispatch' && (github.event.inputs.dry_run == 'true' || github.event.inputs.dry_run == '1')) }} |
Copilot
AI
Sep 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deploy condition logic is complex and duplicates the dry-run check logic. Consider simplifying by using a job-level environment variable or extracting this logic into a reusable expression to improve maintainability.
| if: ${{ !(github.event_name == 'workflow_dispatch' && (github.event.inputs.dry_run == 'true' || github.event.inputs.dry_run == '1')) }} | |
| if: ${{ env.DRY_RUN != 'true' && env.DRY_RUN != '1' }} |
modified: .gitignore
Expanded deploy workflow to support both 'main' and 'Main' branches and improved secret/environment variable syntax. Added VSCode workspace color settings and a Neovim quick reference markdown doc. Minor updates to README and package.json, and fixed script path in sync-secrets.sh.