diff --git a/.github/workflows/depoly.yml b/.github/workflows/deploy.yml similarity index 80% rename from .github/workflows/depoly.yml rename to .github/workflows/deploy.yml index 454f59d..7313876 100644 --- a/.github/workflows/depoly.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,10 @@ on: - '.github/PULL_REQUEST_TEMPLATE/**' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + jobs: deploy: runs-on: ubuntu-latest @@ -24,7 +28,8 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@v5 + - name: Checkout repository + uses: actions/checkout@v5 - name: Deploy Worker uses: cloudflare/wrangler-action@v3 with: diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index ab7b095..64c0cc1 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -33,6 +33,10 @@ on: - '.github/PULL_REQUEST_TEMPLATE/**' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 6e86a8d..be202b4 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -17,6 +17,10 @@ on: - '.github/PULL_REQUEST_TEMPLATE/**' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + jobs: convert-and-sync: runs-on: ubuntu-latest @@ -43,17 +47,11 @@ jobs: - name: Copy source code files only run: | - # Copy essential source and config files (no documentation, no tests) + # Copy only runtime-required files (no documentation, tests, or dev configs) cp -r src /tmp/page-conversion/ - mkdir -p /tmp/page-conversion/.github/workflows cp package.json /tmp/page-conversion/ cp package-lock.json /tmp/page-conversion/ 2>/dev/null || true cp wrangler.toml /tmp/page-conversion/ - cp vitest.config.js /tmp/page-conversion/ - cp eslint.config.js /tmp/page-conversion/ - cp .prettierrc /tmp/page-conversion/ 2>/dev/null || true - cp .gitignore /tmp/page-conversion/ 2>/dev/null || true - cp tsconfig.json /tmp/page-conversion/ 2>/dev/null || true cp LICENSE /tmp/page-conversion/ - name: Create Pages Function handler @@ -159,12 +157,6 @@ jobs: sed 's/"start": "wrangler dev"/"start": "wrangler pages dev ."/' \ > package.json.tmp && mv package.json.tmp package.json - - name: Update vitest.config.js to include functions/ - run: | - cd /tmp/page-conversion - # Add functions/ to coverage include - sed -i "s/include: \['src\/\*\*\/\*.js', 'src\/\*\*\/\*.ts'\]/include: ['src\/**\/*.js', 'src\/**\/*.ts', 'functions\/**\/*.js']/" vitest.config.js - - name: Initialize page branch run: | cd /tmp/page-conversion @@ -182,9 +174,8 @@ jobs: - Update src/index.js: Export handleRequest for Pages Function import - Update wrangler.toml: Configure for Pages deployment (no observability) - Update package.json: Change scripts to use Pages commands - - Update vitest.config.js: Include functions/ in coverage - Source files only (documentation and tests excluded)." + Runtime files only (documentation, tests, and dev configs excluded)." - name: Force push to page branch run: |