fix: start rest timer on checkbox click in checklist mode #140
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: PR | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| check: | |
| if: github.event.action != 'closed' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Merge main into PR branch | |
| run: | | |
| git config user.name "CI" | |
| git config user.email "ci@localhost" | |
| git merge origin/main --no-edit | |
| - uses: ./.github/actions/setup | |
| - run: yarn biome ci | |
| - run: yarn typecheck | |
| - run: yarn test | |
| - run: yarn build | |
| env: | |
| VITE_CLERK_PUBLISHABLE_KEY: ${{ vars.VITE_TEST_CLERK_PUBLISHABLE_KEY }} | |
| VITE_R2_BASE_URL: ${{ vars.VITE_R2_BASE_URL }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: workers/dist | |
| retention-days: 1 | |
| preview: | |
| if: github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| needs: check | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Merge main into PR branch | |
| run: | | |
| git config user.name "CI" | |
| git config user.email "ci@localhost" | |
| git merge origin/main --no-edit | |
| - uses: ./.github/actions/setup | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: workers/dist | |
| - name: Deploy preview | |
| id: deploy | |
| run: | | |
| DEPLOY_OUTPUT=$(yarn workspace @macromaxxing/workers wrangler pages deploy --project-name=${{ github.event.repository.name }} --branch=${{ github.head_ref }} 2>&1) | |
| echo "$DEPLOY_OUTPUT" | |
| PREVIEW_URL=$(echo "$DEPLOY_OUTPUT" | grep -oP 'https://[^\s]+\.pages\.dev' | tail -1) | |
| echo "url=$PREVIEW_URL" >> "$GITHUB_OUTPUT" | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| - name: Comment preview URL | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: preview | |
| message: | | |
| ## Preview deployment | |
| | | | | |
| |---|---| | |
| | **URL** | ${{ steps.deploy.outputs.url }} | | |
| | **Branch** | `${{ github.head_ref }}` | | |
| | **Commit** | ${{ github.event.pull_request.head.sha }} | | |
| cleanup: | |
| if: github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Delete preview deployments | |
| run: | | |
| PROJECT="${{ github.event.repository.name }}" | |
| ACCOUNT_ID="${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" | |
| API_URL="https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID}/pages/projects/${PROJECT}/deployments" | |
| # List all deployments, filter to this PR's branch | |
| DEPLOYMENTS=$(curl -s "${API_URL}" \ | |
| -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" \ | |
| | jq -r --arg branch "${{ github.head_ref }}" \ | |
| '.result[] | select(.deployment_trigger.metadata.branch == $branch) | .id') | |
| for ID in $DEPLOYMENTS; do | |
| echo "Deleting deployment $ID" | |
| curl -s -X DELETE "${API_URL}/${ID}?force=true" \ | |
| -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" | |
| done |