diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 5178392db..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": [ - "airbnb", - "plugin:prettier/recommended" - ], - "env": { - "commonjs": true, - "es6": true, - "node": true - }, - "parserOptions": { - "ecmaVersion": 2018 - }, - "ignorePatterns": ["example/*"] -} \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 2257055ce..f427cddc9 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -2,7 +2,7 @@ github: [amondnet] patreon: amond -open_collective: #amond +open_collective: # amond ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..c835d65f2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI +on: + pull_request: + branches: + - master + push: + branches: + - master +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + build: + runs-on: ubuntu-latest + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 10 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Lint + run: pnpm lint + + - name: Test + run: pnpm test \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4b765ab2b..84b53c7ca 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ./ id: vercel-action with: diff --git a/.github/workflows/example-angular.yml b/.github/workflows/example-angular.yml index 594cd91b1..cb182c43f 100644 --- a/.github/workflows/example-angular.yml +++ b/.github/workflows/example-angular.yml @@ -9,18 +9,26 @@ jobs: angular: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v1 + - name: Checkout + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 10 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v4 with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: build + node-version-file: .nvmrc + cache: pnpm + + - name: Build run: | cd example/angular - npm ci - npx ng build --prod + pnpm install --frozen-lockfile + pnpm dlx ng build --prod - uses: ./ id: vercel-action-staging diff --git a/.github/workflows/example-express-basic-auth.yml b/.github/workflows/example-express-basic-auth.yml index caa453cc8..a6cf9e1b1 100644 --- a/.github/workflows/example-express-basic-auth.yml +++ b/.github/workflows/example-express-basic-auth.yml @@ -5,12 +5,11 @@ on: - master pull_request_target: - jobs: basic-auth: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ./ id: now-deployment-staging if: github.event_name == 'pull_request_target' @@ -28,5 +27,5 @@ jobs: vercel-token: ${{ secrets.VERCEL_TOKEN }} vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_AUTH }} - vercel-args: '--prod' + vercel-args: --prod working-directory: example/express-basic-auth diff --git a/.github/workflows/example-nextjs.yml b/.github/workflows/example-nextjs.yml index 518f0db5e..3b75bd6ab 100644 --- a/.github/workflows/example-nextjs.yml +++ b/.github/workflows/example-nextjs.yml @@ -10,17 +10,32 @@ jobs: static: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: | - npm ci - npx vercel pull --yes --token=${VERCEL_TOKEN} + - name: Checkout + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 10 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - run: pnpm dlx vercel pull --yes --token=${VERCEL_TOKEN} working-directory: example/nextjs env: VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_NEXTJS }} VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} - run: | - npx vercel build + pnpm dlx vercel build if: github.event_name == 'pull_request_target' working-directory: example/nextjs env: @@ -51,7 +66,7 @@ jobs: env: REF: ${{ github.ref }} - run: | - npx vercel build --prod + pnpm dlx vercel build --prod if: github.event_name == 'push' working-directory: example/nextjs env: diff --git a/.github/workflows/example-scope.yml b/.github/workflows/example-scope.yml index cbe531f8d..0e6b2b864 100644 --- a/.github/workflows/example-scope.yml +++ b/.github/workflows/example-scope.yml @@ -5,13 +5,11 @@ on: - master pull_request_target: - - jobs: static: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ./ id: now-deployment-staging if: github.event_name == 'pull_request_target' @@ -30,6 +28,6 @@ jobs: vercel-token: ${{ secrets.VERCEL_TOKEN }} vercel-org-id: ${{ secrets.VERCEL_ORG_ID_TEAM_SCOPE }} vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_TEAM_SCOPE }} - vercel-args: '--prod' + vercel-args: --prod scope: ${{ secrets.VERCEL_SCOPE }} working-directory: example/team-scope diff --git a/.github/workflows/example-static.yml b/.github/workflows/example-static.yml index c9f6ed4c1..c8207da52 100644 --- a/.github/workflows/example-static.yml +++ b/.github/workflows/example-static.yml @@ -10,7 +10,7 @@ jobs: static: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ./ id: now-deployment-staging if: github.event_name == 'pull_request_target' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b308a58dc..36f9989b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,6 @@ on: - master pull_request_target: - jobs: deploy: runs-on: ubuntu-latest diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 3587d512b..000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "printWidth": 80, - "singleQuote": true, - "trailingComma": "all", - "useTabs": false, - "tabWidth": 2, - "semi": true -} \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index 320319ce2..ca136f464 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -69,4 +69,4 @@ npm run package # Build the action with ncc (outputs to dist/) 2. **Project Linking**: The `.vercel/` directory with org/project IDs must be committed 3. **Build Process**: Builds should happen in GitHub Actions, not Vercel 4. **Backward Compatibility**: Maintain support for deprecated "zeit-" prefixed inputs -5. **Error Handling**: Use proper exit codes and clear error messages for CI/CD integration \ No newline at end of file +5. **Error Handling**: Use proper exit codes and clear error messages for CI/CD integration diff --git a/DEVELOP.md b/DEVELOP.md index 691e25e31..4266afb09 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -11,10 +11,8 @@ git add dist git tag --new-release ``` - # Changelog ```bash github_changelog_generator ``` - diff --git a/README.md b/README.md index a0ff2565c..06b172e73 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ ![example - basic auth](https://github.com/amondnet/vercel-action/workflows/example%20-%20basic%20auth/badge.svg) ![example - angular](https://github.com/amondnet/vercel-action/workflows/example%20-%20angular/badge.svg) -![stars](https://badgen.net/github/stars/amondnet/vercel-action) -![forks](https://badgen.net/github/forks/amondnet/vercel-action) +![stars](https://badgen.net/github/stars/amondnet/vercel-action) +![forks](https://badgen.net/github/forks/amondnet/vercel-action) ![HitCount](http://hits.dwyl.com/amondnet/vercel-action.svg) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=amondnet_vercel-action&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=amondnet_vercel-action) @@ -18,12 +18,12 @@ [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=amondnet_vercel-action&metric=security_rating)](https://sonarcloud.io/dashboard?id=amondnet_vercel-action) This action was formerly [Zeit Now Deployment](https://github.com/marketplace/actions/zeit-now-deployment). [Migration Guide](#migration-from-v2) -![stars](https://badgen.net/github/stars/amondnet/now-deployment) ![forks](https://badgen.net/github/forks/amondnet/now-deployment) +![stars](https://badgen.net/github/stars/amondnet/now-deployment) ![forks](https://badgen.net/github/forks/amondnet/now-deployment) ## Introduction to Vercel -​Vercel is a cloud platform for **static sites** and **Serverless Functions** that fits perfectly with your workflow. It enables developers to host **Jamstack** websites and web services that **deploy instantly**, **scale automatically**, and requires **no supervision**, all with **no configuration**. +Vercel is a cloud platform for **static sites** and **Serverless Functions** that fits perfectly with your workflow. It enables developers to host **Jamstack** websites and web services that **deploy instantly**, **scale automatically**, and requires **no supervision**, all with **no configuration**. -This action make a Vercel deployment with github actions. +This action make a Vercel deployment with github actions. - [x] Deploy to Vercel. - [x] Comment on pull request. @@ -50,8 +50,8 @@ This action make a Vercel deployment with github actions. | vercel-org-id |