The min-max control context menu at the chart config dialog #240
Workflow file for this run
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: 'Deployment to Cloudflare Pages' | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| commit_reference: | |
| name: Get Commit Reference | |
| runs-on: ubuntu-latest | |
| outputs: | |
| commit_ref: ${{ steps.set_commit_ref.outputs.commit_ref }} | |
| steps: | |
| - name: Set Commit Reference | |
| id: set_commit_ref | |
| run: | | |
| if [[ "${{ github.event_name }}" == "push" ]]; then | |
| COMMIT_REF=${{ github.sha }} | |
| else | |
| COMMIT_REF=${{ github.event.pull_request.head.sha }} | |
| fi | |
| echo "commit_ref=$COMMIT_REF" >> $GITHUB_OUTPUT | |
| # Set a simple output to confirm the value | |
| echo "EVENT: ${{ github.event_name }}, COMMIT_REF=$COMMIT_REF" | |
| # Build the code (minimal secrets here) | |
| build: | |
| name: Build | |
| needs: commit_reference | |
| uses: ./.github/workflows/build.yml | |
| with: | |
| debug_build: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }} | |
| commit_ref: ${{ needs.commit_reference.outputs.commit_ref }} | |
| # Prepare branch name for deployment | |
| prepare_branch: | |
| name: Prepare Branch Name | |
| runs-on: ubuntu-latest | |
| outputs: | |
| branch_name: ${{ steps.branch_name.outputs.BRANCH }} | |
| steps: | |
| - name: Set alias branch name for Cloudflare | |
| id: branch_name | |
| run: | | |
| if [[ "${{ github.event_name }}" == "push" ]]; then | |
| BRANCH=${{ github.ref_name }} | |
| else | |
| BRANCH=PR${{ github.event.pull_request.number }} | |
| fi | |
| echo "BRANCH=$BRANCH" >> $GITHUB_OUTPUT | |
| # Set a simple output to confirm the value | |
| echo "EVENT: ${{ github.event_name }}, BRANCH: $BRANCH" | |
| # Deploy with secrets (no PR code checkout) | |
| deploy: | |
| name: Deploy | |
| needs: [build, prepare_branch] | |
| uses: ./.github/workflows/deploy_cloudflare.yml | |
| with: | |
| branch_name: ${{ needs.prepare_branch.outputs.branch_name }} | |
| environment_name: ${{ github.ref_name }} | |
| secrets: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| # Add PR comment with deployment links | |
| pr_comment: | |
| name: Add PR Comment | |
| needs: [build, deploy] | |
| if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Add deployment comment | |
| if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request' | |
| uses: thollander/actions-comment-pull-request@v3 | |
| with: | |
| message: | | |
| Preview URL: ${{ needs.deploy.outputs.deployment_alias_url }} | |
| comment-tag: 'Preview URL' | |
| mode: recreate |