├── .nvmrc ├── index.test.js ├── example ├── static │ ├── .gitignore │ ├── index.html │ └── vercel.json ├── angular │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── app │ │ │ ├── app.component.css │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ ├── app.component.spec.ts │ │ │ └── app.component.html │ │ ├── favicon.ico │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── styles.css │ │ ├── index.html │ │ ├── main.ts │ │ ├── test.ts │ │ ├── vercel.json │ │ └── polyfills.ts │ ├── e2e │ │ ├── tsconfig.json │ │ ├── src │ │ │ ├── app.po.ts │ │ │ └── app.e2e-spec.ts │ │ └── protractor.conf.js │ ├── tsconfig.app.json │ ├── .editorconfig │ ├── tsconfig.spec.json │ ├── browserslist │ ├── tsconfig.json │ ├── .gitignore │ ├── README.md │ ├── karma.conf.js │ ├── package.json │ ├── tslint.json │ └── angular.json ├── team-scope │ ├── .gitignore │ └── index.html └── express-basic-auth │ ├── .gitignore │ ├── _static │ └── index.html │ ├── vercel.json │ ├── index.js │ ├── package.json │ └── package-lock.json ├── public └── index.html ├── .github ├── CODEOWNERS └── FUNDING.yml ├── preview.png ├── .prettierrc.json ├── .eslintrc.json ├── .github_changelog_generator ├── vercel.json ├── DEVELOP.md ├── now.js ├── LICENSE ├── .gitignore ├── package.json ├── action.yml ├── labels.json ├── changelog_archived.md ├── README.md ├── index.js └── CHANGELOG.md /.nvmrc: -------------------------------------------------------------------------------- 1 | v22 2 | -------------------------------------------------------------------------------- /index.test.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /example/static/.gitignore: -------------------------------------------------------------------------------- 1 | .vercel -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | yay 2 | 22 3 | -------------------------------------------------------------------------------- /example/angular/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/team-scope/.gitignore: -------------------------------------------------------------------------------- 1 | .vercel -------------------------------------------------------------------------------- /example/angular/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @elastic/docs-engineering 2 | -------------------------------------------------------------------------------- /example/express-basic-auth/.gitignore: -------------------------------------------------------------------------------- 1 | .now 2 | .vercel -------------------------------------------------------------------------------- /example/static/index.html: -------------------------------------------------------------------------------- 1 | Working 2 | Static 3 | Test -------------------------------------------------------------------------------- /example/team-scope/index.html: -------------------------------------------------------------------------------- 1 | Working 2 | Static 3 | -------------------------------------------------------------------------------- /example/express-basic-auth/_static/index.html: -------------------------------------------------------------------------------- 1 | Working 2 | Static 3 | -------------------------------------------------------------------------------- /preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elastic/builder/main/preview.png -------------------------------------------------------------------------------- /example/angular/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elastic/builder/main/example/angular/src/favicon.ico -------------------------------------------------------------------------------- /example/angular/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /example/angular/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "useTabs": false, 6 | "tabWidth": 2, 7 | "semi": true 8 | } -------------------------------------------------------------------------------- /example/angular/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'angular'; 10 | } 11 | -------------------------------------------------------------------------------- /example/static/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zeit-now-deployment-action-example-static", 3 | "version": 2, 4 | "scope": "amond", 5 | "public": false, 6 | "github": { 7 | "enabled": false 8 | }, 9 | "builds": [ 10 | { "src": "./**", "use": "@vercel/static" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "airbnb", 4 | "plugin:prettier/recommended" 5 | ], 6 | "env": { 7 | "commonjs": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "parserOptions": { 12 | "ecmaVersion": 2018 13 | }, 14 | "ignorePatterns": ["example/*"] 15 | } -------------------------------------------------------------------------------- /example/angular/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/angular/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [] 6 | }, 7 | "include": [ 8 | "src/**/*.ts" 9 | ], 10 | "exclude": [ 11 | "src/test.ts", 12 | "src/**/*.spec.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.github_changelog_generator: -------------------------------------------------------------------------------- 1 | user=amondnet 2 | project=vercel-action 3 | future-release=v25.0.0 4 | since-tag=v2.0.3 5 | enhancement-labels=Type: Enhancement,Type: Feature,Type: Improvement 6 | bug-labels=Type: Bug 7 | breaking-labels=Type: Breaking Change 8 | exclude-tags=v2,v1,v19,v20,v25 9 | base=changelog_archived.md -------------------------------------------------------------------------------- /example/angular/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /example/angular/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vercel-action", 3 | "version": 2, 4 | "scope": "amond", 5 | "public": false, 6 | "github": { 7 | "enabled": false 8 | }, 9 | "builds": [ 10 | { "src": "./public/**", "use": "@now/static" } 11 | ], 12 | "routes": [ 13 | { "src": "/(.*)", "dest": "public/$1" } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /DEVELOP.md: -------------------------------------------------------------------------------- 1 | # Package 2 | 3 | ```bash 4 | npm run package 5 | ``` 6 | 7 | # Release 8 | 9 | ```bash 10 | git add dist 11 | git tag -a v 12 | git push origin v 13 | ``` 14 | 15 | 16 | # Changelog 17 | 18 | [Draft a new release](https://github.com/elastic/builder/releases/new) for your newly pushed tag. 19 | 20 | -------------------------------------------------------------------------------- /example/express-basic-auth/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "public": false, 4 | "builds": [ 5 | { 6 | "src": "index.js", 7 | "use": "@vercel/node", 8 | "config": { 9 | "includeFiles": ["_static/**/*.js"] 10 | } 11 | } 12 | ], 13 | "routes": [ 14 | { "src": "/(.*)", "dest": "index.js" } 15 | ] 16 | } -------------------------------------------------------------------------------- /example/angular/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Angular 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /example/angular/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /example/angular/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AppComponent } from './app.component'; 5 | 6 | @NgModule({ 7 | declarations: [ 8 | AppComponent 9 | ], 10 | imports: [ 11 | BrowserModule 12 | ], 13 | providers: [], 14 | bootstrap: [AppComponent] 15 | }) 16 | export class AppModule { } 17 | -------------------------------------------------------------------------------- /example/express-basic-auth/index.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const basicAuth = require("express-basic-auth"); 3 | 4 | const app = express(); 5 | 6 | app.use( 7 | basicAuth({ 8 | users: { 9 | user: "pass" 10 | }, 11 | challenge: true 12 | }) 13 | ); 14 | app.use(express.static(__dirname + '/_static')); 15 | 16 | app.listen(4444, () => console.log('Listening on port 4444...')); 17 | -------------------------------------------------------------------------------- /example/express-basic-auth/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-basic-auth-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "express": "^4.17.1", 14 | "express-basic-auth": "^1.2.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/angular/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /example/angular/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /example/angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "module": "esnext", 10 | "moduleResolution": "node", 11 | "experimentalDecorators": true, 12 | "module": "esnext", 13 | "moduleResolution": "node", 14 | "importHelpers": true, 15 | "target": "es2015", 16 | "typeRoots": [ 17 | "node_modules/@types" 18 | ], 19 | "lib": [ 20 | "es2018", 21 | "dom" 22 | ] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [amondnet] 4 | patreon: amond 5 | open_collective: #amond 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /example/angular/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /example/angular/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to angular!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /example/angular/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /example/angular/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events.json 15 | speed-measure-plugin.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | 48 | .vercel -------------------------------------------------------------------------------- /example/angular/src/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zeit-now-deployment-action-example-angular", 3 | "version": 2, 4 | "scope": "amond", 5 | "public": false, 6 | "github": { 7 | "enabled": false 8 | }, 9 | "routes": [ 10 | { 11 | "src": "/(assets/.+|amcharts/.+|.+\\.css|.+\\.js|.+\\.eot|.+\\.svg|.+\\.ttf|.+\\.woff|.+\\.gif|.+\\.png|.+\\.jpg)", 12 | "headers": { "cache-control": "max-age=31536000,immutable" }, 13 | "dest": "/$1" 14 | }, 15 | { 16 | "src": "/(.*).html", 17 | "headers": { "cache-control": "public,max-age=0,must-revalidate" }, 18 | "dest": "/$1.html" 19 | }, 20 | { 21 | "src": "/(.*)", 22 | "headers": { "cache-control": "public,max-age=0,must-revalidate" }, 23 | "dest": "/index.html" 24 | }, 25 | { "src": "/robots.txt", "dest": "/robots.txt" }, 26 | { "src": "/favicon.ico", "dest": "/favicon.txt" } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /example/angular/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | 'browserName': 'chrome' 17 | }, 18 | directConnect: true, 19 | baseUrl: 'http://localhost:4200/', 20 | framework: 'jasmine', 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000, 24 | print: function() {} 25 | }, 26 | onPrepare() { 27 | require('ts-node').register({ 28 | project: require('path').join(__dirname, './tsconfig.json') 29 | }); 30 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 31 | } 32 | }; -------------------------------------------------------------------------------- /now.js: -------------------------------------------------------------------------------- 1 | const { spawn } = require('child_process') 2 | 3 | function nowDeploy( context ) { 4 | 5 | 6 | const now = spawn('npx', [ 7 | 'now', 8 | '-m', 9 | 'githubCommitAuthorName=Minsu Lee', 10 | '-m', 11 | 'githubCommitAuthorLogin=amondnet', 12 | '-m', 13 | 'githubDeployment=1', 14 | '-m', 15 | 'githubOrg=amondnet', 16 | '-m', 17 | 'githubRepo=test', 18 | '-m', 19 | 'githubCommitOrg=amondnet', 20 | '-m', 21 | 'githubCommitRepo=test', 22 | '-m', 23 | 'githubCommitSha=48615ece0acfbe87682bbb64d7b87b75db32b60e', 24 | '-m', 25 | 'githubCommitMessage=test']) 26 | 27 | now.stdout.on('data', (data) => { 28 | console.log(`stdout': ${data}`) 29 | }) 30 | 31 | now.stderr.on(`data`, (data) => { 32 | console.error(`stderr: ${data}`) 33 | }) 34 | 35 | now.on('close', (code) => { 36 | if (code === 0) { 37 | console.log(`child process exited with code ${code}`) 38 | } 39 | }) 40 | } 41 | 42 | 43 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Minsu Lee 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /example/angular/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | 4 | describe('AppComponent', () => { 5 | beforeEach(async(() => { 6 | TestBed.configureTestingModule({ 7 | declarations: [ 8 | AppComponent 9 | ], 10 | }).compileComponents(); 11 | })); 12 | 13 | it('should create the app', () => { 14 | const fixture = TestBed.createComponent(AppComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | expect(app).toBeTruthy(); 17 | }); 18 | 19 | it(`should have as title 'angular'`, () => { 20 | const fixture = TestBed.createComponent(AppComponent); 21 | const app = fixture.debugElement.componentInstance; 22 | expect(app.title).toEqual('angular'); 23 | }); 24 | 25 | it('should render title in a h1 tag', () => { 26 | const fixture = TestBed.createComponent(AppComponent); 27 | fixture.detectChanges(); 28 | const compiled = fixture.debugElement.nativeElement; 29 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to angular!'); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /example/angular/README.md: -------------------------------------------------------------------------------- 1 | # Angular 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.4. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /example/angular/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, './coverage/angular'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false, 30 | restartOnFileChange: true 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /example/angular/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

4 | Welcome to {{ title }}! 5 |

6 | Angular Logo 7 |
8 |

Here are some links to help you start:

9 | 20 | 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # comment this out distribution branches 2 | node_modules 3 | .idea 4 | 5 | .now 6 | .vercel 7 | 8 | node_modules/ 9 | 10 | # Editors 11 | .vscode 12 | 13 | # Logs 14 | logs 15 | *.log 16 | npm-debug.log* 17 | yarn-debug.log* 18 | yarn-error.log* 19 | 20 | # Runtime data 21 | pids 22 | *.pid 23 | *.seed 24 | *.pid.lock 25 | 26 | # Directory for instrumented libs generated by jscoverage/JSCover 27 | lib-cov 28 | 29 | # Coverage directory used by tools like istanbul 30 | coverage 31 | 32 | # nyc test coverage 33 | .nyc_output 34 | 35 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 36 | .grunt 37 | 38 | # Bower dependency directory (https://bower.io/) 39 | bower_components 40 | 41 | # node-waf configuration 42 | .lock-wscript 43 | 44 | # Compiled binary addons (https://nodejs.org/api/addons.html) 45 | build/Release 46 | 47 | # Other Dependency directories 48 | jspm_packages/ 49 | 50 | # TypeScript v1 declaration files 51 | typings/ 52 | 53 | # Optional npm cache directory 54 | .npm 55 | 56 | # Optional eslint cache 57 | .eslintcache 58 | 59 | # Optional REPL history 60 | .node_repl_history 61 | 62 | # Output of 'npm pack' 63 | *.tgz 64 | 65 | # Yarn Integrity file 66 | .yarn-integrity 67 | 68 | # dotenv environment variables file 69 | .env 70 | 71 | # next.js build output 72 | .next -------------------------------------------------------------------------------- /example/angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "~8.0.1", 15 | "@angular/common": "~8.0.1", 16 | "@angular/compiler": "~8.0.1", 17 | "@angular/core": "~8.0.1", 18 | "@angular/forms": "~8.0.1", 19 | "@angular/platform-browser": "~8.0.1", 20 | "@angular/platform-browser-dynamic": "~8.0.1", 21 | "@angular/router": "~8.0.1", 22 | "rxjs": "~6.4.0", 23 | "tslib": "^1.9.0", 24 | "zone.js": "~0.9.1" 25 | }, 26 | "devDependencies": { 27 | "@angular-devkit/build-angular": "~0.800.0", 28 | "@angular/cli": "~8.0.4", 29 | "@angular/compiler-cli": "~8.0.1", 30 | "@angular/language-service": "~8.0.1", 31 | "@types/node": "~8.9.4", 32 | "@types/jasmine": "~3.3.8", 33 | "@types/jasminewd2": "~2.0.3", 34 | "codelyzer": "^5.0.0", 35 | "jasmine-core": "~3.4.0", 36 | "jasmine-spec-reporter": "~4.2.1", 37 | "karma": "~4.1.0", 38 | "karma-chrome-launcher": "~2.2.0", 39 | "karma-coverage-istanbul-reporter": "~2.0.1", 40 | "karma-jasmine": "~2.0.1", 41 | "karma-jasmine-html-reporter": "^1.4.0", 42 | "protractor": "~5.4.0", 43 | "ts-node": "~7.0.0", 44 | "tslint": "~5.15.0", 45 | "typescript": "~3.4.3" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vercel-action", 3 | "private": true, 4 | "license": "MIT", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/amondnet/vercel-action" 8 | }, 9 | "author": { 10 | "name": "Minsu Lee", 11 | "email": "amond@amond.net", 12 | "url": "https://amond.dev" 13 | }, 14 | "version": "25.2.0", 15 | "main": "index.js", 16 | "scripts": { 17 | "lint": "eslint index.js", 18 | "start": "node ./index.js", 19 | "package": "ncc build index.js -o dist", 20 | "test": "jest", 21 | "format": "prettier --write index.js", 22 | "format-check": "prettier --check index.js", 23 | "all": "npm run format && npm run lint && npm run package && npm test" 24 | }, 25 | "dependencies": { 26 | "@actions/core": "^1.10.0", 27 | "@actions/exec": "^1.0.3", 28 | "@actions/github": "^2.1.1", 29 | "axios": "~0.18.1", 30 | "common-tags": "^1.8.0", 31 | "vercel": "44.5.3", 32 | "@octokit/webhooks": "latest" 33 | }, 34 | "devDependencies": { 35 | "@vercel/ncc": "^0.36.0", 36 | "prettier": "^2.8.3", 37 | "eslint": "^8.2.0", 38 | "eslint-config-airbnb": "^19.0.4", 39 | "eslint-config-prettier": "^8.6.0", 40 | "eslint-plugin-import": "^2.27.5", 41 | "eslint-plugin-jsx-a11y": "^6.7.1", 42 | "eslint-plugin-prettier": "^4.2.1", 43 | "eslint-plugin-react": "^7.32.1", 44 | "eslint-plugin-react-hooks": "^4.6.0", 45 | "jest": "^29.4.0" 46 | }, 47 | "engines": { 48 | "node": "v22" 49 | }, 50 | "keywords": [ 51 | "GitHub", 52 | "Actions", 53 | "Vercel", 54 | "Zeit", 55 | "Now" 56 | ] 57 | } 58 | -------------------------------------------------------------------------------- /example/angular/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rules": { 4 | "array-type": false, 5 | "arrow-parens": false, 6 | "deprecation": { 7 | "severity": "warn" 8 | }, 9 | "component-class-suffix": true, 10 | "contextual-lifecycle": true, 11 | "directive-class-suffix": true, 12 | "directive-selector": [ 13 | true, 14 | "attribute", 15 | "app", 16 | "camelCase" 17 | ], 18 | "component-selector": [ 19 | true, 20 | "element", 21 | "app", 22 | "kebab-case" 23 | ], 24 | "import-blacklist": [ 25 | true, 26 | "rxjs/Rx" 27 | ], 28 | "interface-name": false, 29 | "max-classes-per-file": false, 30 | "max-line-length": [ 31 | true, 32 | 140 33 | ], 34 | "member-access": false, 35 | "member-ordering": [ 36 | true, 37 | { 38 | "order": [ 39 | "static-field", 40 | "instance-field", 41 | "static-method", 42 | "instance-method" 43 | ] 44 | } 45 | ], 46 | "no-consecutive-blank-lines": false, 47 | "no-console": [ 48 | true, 49 | "debug", 50 | "info", 51 | "time", 52 | "timeEnd", 53 | "trace" 54 | ], 55 | "no-empty": false, 56 | "no-inferrable-types": [ 57 | true, 58 | "ignore-params" 59 | ], 60 | "no-non-null-assertion": true, 61 | "no-redundant-jsdoc": true, 62 | "no-switch-case-fall-through": true, 63 | "no-use-before-declare": true, 64 | "no-var-requires": false, 65 | "object-literal-key-quotes": [ 66 | true, 67 | "as-needed" 68 | ], 69 | "object-literal-sort-keys": false, 70 | "ordered-imports": false, 71 | "quotemark": [ 72 | true, 73 | "single" 74 | ], 75 | "trailing-comma": false, 76 | "no-conflicting-lifecycle": true, 77 | "no-host-metadata-property": true, 78 | "no-input-rename": true, 79 | "no-inputs-metadata-property": true, 80 | "no-output-native": true, 81 | "no-output-on-prefix": true, 82 | "no-output-rename": true, 83 | "no-outputs-metadata-property": true, 84 | "template-banana-in-box": true, 85 | "template-no-negated-async": true, 86 | "use-lifecycle-interface": true, 87 | "use-pipe-transform-interface": true 88 | }, 89 | "rulesDirectory": [ 90 | "codelyzer" 91 | ] 92 | } -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Vercel Action' 2 | description: 'This action make a deployment with github actions instead of Vercel builder.' 3 | inputs: 4 | vercel-token: 5 | description: 'Vercel token' 6 | required: true 7 | vercel-args: 8 | description: '' 9 | required: false 10 | default: '' 11 | github-comment: 12 | required: false 13 | default: 'true' 14 | description: 'if you want to comment on pr and commit, set true, default: true' 15 | github-token: 16 | required: false 17 | description: 'if you want to comment on pr and commit, set token' 18 | github-deployment: 19 | required: false 20 | default: 'false' 21 | description: 'if you want to create github deployment, set true, default: false' 22 | working-directory: 23 | required: false 24 | description: the working directory 25 | vercel-project-id: 26 | required: false 27 | description: 'Vercel CLI 17+, ❗️ The `name` property in vercel.json is deprecated (https://zeit.ink/5F)' 28 | vercel-org-id: 29 | required: false 30 | description: 'Vercel CLI 17+, ❗️ The `name` property in vercel.json is deprecated (https://zeit.ink/5F)' 31 | vercel-project-name: 32 | required: false 33 | description: "The name of the project; if absent we'll use the `vercel inspect` command to determine." 34 | vercel-version: 35 | required: false 36 | description: "vercel-cli package version" 37 | scope: 38 | required: false 39 | description: 'If you are work in team scope, you should set this value to your team id.' 40 | zeit-token: 41 | description: 'zeit.co token' 42 | required: false 43 | deprecationMessage: 'Zeit is now Vercel. Use "vercel-token" instead' 44 | now-args: 45 | description: '' 46 | required: false 47 | default: '' 48 | deprecationMessage: 'Zeit is now Vercel. Use "vercel-args" instead.' 49 | now-project-id: 50 | required: false 51 | description: 'Vercel CLI 17+, ❗️ The `name` property in vercel.json is deprecated (https://zeit.ink/5F)' 52 | deprecationMessage: 'Zeit is now Vercel. Use "vercel-project-id" instead.' 53 | now-org-id: 54 | required: false 55 | description: 'Vercel CLI 17+, ❗️ The `name` property in vercel.json is deprecated (https://zeit.ink/5F)' 56 | deprecationMessage: 'Zeit is now Vercel. Use "vercel-org-id" instead.' 57 | alias-domains: 58 | required: false 59 | description: 'You can assign a domain to this deployment. Please note that this domain must have been configured in the project. You can use pull request number via `{{PR_NUMBER}}` and branch via `{{BRANCH}}`' 60 | default: '' 61 | 62 | outputs: 63 | preview-url: 64 | description: 'deployment preview URL' 65 | preview-name: 66 | description: 'deployment preview name' 67 | runs: 68 | using: 'node16' 69 | main: 'dist/index.js' 70 | 71 | branding: 72 | icon: 'triangle' 73 | color: 'white' 74 | -------------------------------------------------------------------------------- /example/angular/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 22 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 23 | 24 | /** 25 | * Web Animations `@angular/platform-browser/animations` 26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 28 | */ 29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 30 | 31 | /** 32 | * By default, zone.js will patch all possible macroTask and DomEvents 33 | * user can disable parts of macroTask/DomEvents patch by setting following flags 34 | * because those flags need to be set before `zone.js` being loaded, and webpack 35 | * will put import in the top of bundle, so user need to create a separate file 36 | * in this directory (for example: zone-flags.ts), and put the following flags 37 | * into that file, and then add the following code before importing zone.js. 38 | * import './zone-flags.ts'; 39 | * 40 | * The flags allowed in zone-flags.ts are listed here. 41 | * 42 | * The following flags will work for all browsers. 43 | * 44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 46 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 47 | * 48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 50 | * 51 | * (window as any).__Zone_enable_cross_context_check = true; 52 | * 53 | */ 54 | 55 | /*************************************************************************************************** 56 | * Zone JS is required by default for Angular itself. 57 | */ 58 | import 'zone.js/dist/zone'; // Included with Angular CLI. 59 | 60 | 61 | /*************************************************************************************************** 62 | * APPLICATION IMPORTS 63 | */ 64 | -------------------------------------------------------------------------------- /example/angular/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "angular": { 7 | "projectType": "application", 8 | "schematics": {}, 9 | "root": "", 10 | "sourceRoot": "src", 11 | "prefix": "app", 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:browser", 15 | "options": { 16 | "outputPath": "dist/angular", 17 | "index": "src/index.html", 18 | "main": "src/main.ts", 19 | "polyfills": "src/polyfills.ts", 20 | "tsConfig": "tsconfig.app.json", 21 | "aot": false, 22 | "assets": [ 23 | "src/favicon.ico", 24 | "src/assets", 25 | "src/now.json" 26 | ], 27 | "styles": [ 28 | "src/styles.css" 29 | ], 30 | "scripts": [] 31 | }, 32 | "configurations": { 33 | "production": { 34 | "fileReplacements": [ 35 | { 36 | "replace": "src/environments/environment.ts", 37 | "with": "src/environments/environment.prod.ts" 38 | } 39 | ], 40 | "optimization": true, 41 | "outputHashing": "all", 42 | "sourceMap": false, 43 | "extractCss": true, 44 | "namedChunks": false, 45 | "aot": true, 46 | "extractLicenses": true, 47 | "vendorChunk": false, 48 | "buildOptimizer": true, 49 | "budgets": [ 50 | { 51 | "type": "initial", 52 | "maximumWarning": "2mb", 53 | "maximumError": "5mb" 54 | } 55 | ] 56 | } 57 | } 58 | }, 59 | "serve": { 60 | "builder": "@angular-devkit/build-angular:dev-server", 61 | "options": { 62 | "browserTarget": "angular:build" 63 | }, 64 | "configurations": { 65 | "production": { 66 | "browserTarget": "angular:build:production" 67 | } 68 | } 69 | }, 70 | "extract-i18n": { 71 | "builder": "@angular-devkit/build-angular:extract-i18n", 72 | "options": { 73 | "browserTarget": "angular:build" 74 | } 75 | }, 76 | "test": { 77 | "builder": "@angular-devkit/build-angular:karma", 78 | "options": { 79 | "main": "src/test.ts", 80 | "polyfills": "src/polyfills.ts", 81 | "tsConfig": "tsconfig.spec.json", 82 | "karmaConfig": "karma.conf.js", 83 | "assets": [ 84 | "src/favicon.ico", 85 | "src/assets" 86 | ], 87 | "styles": [ 88 | "src/styles.css" 89 | ], 90 | "scripts": [] 91 | } 92 | }, 93 | "lint": { 94 | "builder": "@angular-devkit/build-angular:tslint", 95 | "options": { 96 | "tsConfig": [ 97 | "tsconfig.app.json", 98 | "tsconfig.spec.json", 99 | "e2e/tsconfig.json" 100 | ], 101 | "exclude": [ 102 | "**/node_modules/**" 103 | ] 104 | } 105 | }, 106 | "e2e": { 107 | "builder": "@angular-devkit/build-angular:protractor", 108 | "options": { 109 | "protractorConfig": "e2e/protractor.conf.js", 110 | "devServerTarget": "angular:serve" 111 | }, 112 | "configurations": { 113 | "production": { 114 | "devServerTarget": "angular:serve:production" 115 | } 116 | } 117 | } 118 | } 119 | }}, 120 | "defaultProject": "angular" 121 | } 122 | -------------------------------------------------------------------------------- /labels.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "duplicate", 4 | "color": "ededed", 5 | "description": "This issue or Pull Request already exists" 6 | }, 7 | { 8 | "name": "help wanted", 9 | "color": "e99695", 10 | "description": "Extra attention is needed" 11 | }, 12 | { 13 | "name": "good first issue", 14 | "color": "7057ff", 15 | "description": "Good for newcomers", 16 | "aliases": [ 17 | "beginner-friendly", 18 | "beginner", 19 | "good-starter-issue", 20 | "good for beginner", 21 | "Good for beginners", 22 | "starter-issue", 23 | "starter" 24 | ] 25 | }, 26 | { 27 | "name": "Priority: Critical", 28 | "color": "ee0701" 29 | }, 30 | { 31 | "name": "Priority: High", 32 | "color": "d93f0b" 33 | }, 34 | { 35 | "name": "Priority: Medium", 36 | "color": "fbca04" 37 | }, 38 | { 39 | "name": "Priority: Low", 40 | "color": "0e8a16" 41 | }, 42 | { 43 | "name": "Status: Abandoned", 44 | "color": "000000", 45 | "description": "The issue or Pull Request is wontfix", 46 | "aliases": [ 47 | "wontfix", 48 | "invalid" 49 | ] 50 | }, 51 | { 52 | "name": "Status: Blocked", 53 | "color": "ee0701", 54 | "description": "Progress on the issue is Blocked", 55 | "aliases": [ 56 | "blocked" 57 | ] 58 | }, 59 | { 60 | "name": "Status: In Progress", 61 | "description": "Work in Progress", 62 | "color": "cccccc" 63 | }, 64 | { 65 | "name": "Status: Proposal", 66 | "color": "d4c5f9", 67 | "description": "Request for comments", 68 | "aliases": [ 69 | "idea", 70 | "Idea", 71 | "proposal", 72 | "Proposal", 73 | "discussion" 74 | ] 75 | }, 76 | { 77 | "name": "Status: PR Welcome", 78 | "color": "2E7733", 79 | "description": "Welcome to Pull Request", 80 | "aliases": [ 81 | "Patch Welcome", 82 | "Status: Ready for PR" 83 | ] 84 | }, 85 | { 86 | "name": "Status: Review Needed", 87 | "color": "fbca04", 88 | "description": "Request for review comments" 89 | }, 90 | { 91 | "name": "Status: Need More Info", 92 | "color": "F9C90A", 93 | "description": "Lacks enough info to make progress" 94 | }, 95 | { 96 | "name": "Type: Breaking Change", 97 | "color": "b60205", 98 | "description": "Includes breaking changes", 99 | "aliases": [ 100 | "breaking", 101 | "breaking-change" 102 | ] 103 | }, 104 | { 105 | "name": "Type: Bug", 106 | "color": "ee0701", 107 | "description": "Bug or Bug fixes", 108 | "aliases": [ 109 | "bug" 110 | ] 111 | }, 112 | { 113 | "name": "Type: Documentation", 114 | "color": "5319e7", 115 | "description": "Documentation only changes", 116 | "aliases": [ 117 | "documents", 118 | "document" 119 | ] 120 | }, 121 | { 122 | "name": "Type: Feature", 123 | "color": "1d76db", 124 | "description": "New Feature", 125 | "aliases": [ 126 | "enhancement" 127 | ] 128 | }, 129 | { 130 | "name": "Type: Refactoring", 131 | "color": "fbca04", 132 | "description": "A code change that neither fixes a bug nor adds a feature", 133 | "aliases": [ 134 | "refactor" 135 | ] 136 | }, 137 | { 138 | "name": "Type: Testing", 139 | "color": "257759", 140 | "description": "Adding missing tests or correcting existing tests", 141 | "aliases": [ 142 | "test", 143 | "testing" 144 | ] 145 | }, 146 | { 147 | "name": "Type: Maintenance", 148 | "color": "abd406", 149 | "description": "Repository Maintenance", 150 | "aliases": [ 151 | "greenkeeper", 152 | "maintenance" 153 | ] 154 | }, 155 | { 156 | "name": "Type: CI", 157 | "color": "ffd412", 158 | "description": "Changes to CI configuration files and scripts", 159 | "aliases": [ 160 | "travis", 161 | "ci", 162 | "circleci" 163 | ] 164 | }, 165 | { 166 | "name": "Type: Question", 167 | "color": "cc317c", 168 | "description": "Further information is requested", 169 | "aliases": [ 170 | "question" 171 | ] 172 | } 173 | ] 174 | -------------------------------------------------------------------------------- /changelog_archived.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | 4 | # ZEIT Now Deplyoment Changelog 5 | 6 | ## [v2.0.3](https://github.com/amondnet/now-deployment/tree/v2.0.3) (2020-05-06) 7 | 8 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v2.0.2...v2.0.3) 9 | 10 | **Implemented enhancements:** 11 | 12 | - Show project name in Github comment [\#44](https://github.com/amondnet/now-deployment/pull/44) ([rodrigorm](https://github.com/rodrigorm)) 13 | 14 | **Closed issues:** 15 | 16 | - Update now version to v18 [\#41](https://github.com/amondnet/now-deployment/issues/41) 17 | 18 | **Merged pull requests:** 19 | 20 | - docs: basic auth example [\#46](https://github.com/amondnet/now-deployment/pull/46) ([amondnet](https://github.com/amondnet)) 21 | - build: now@18.0.0 [\#45](https://github.com/amondnet/now-deployment/pull/45) ([amondnet](https://github.com/amondnet)) 22 | 23 | ## [v2.0.2](https://github.com/amondnet/now-deployment/tree/v2.0.2) (2020-04-04) 24 | 25 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v2.0.1...v2.0.2) 26 | 27 | **Implemented enhancements:** 28 | 29 | - team\_id seems to be not working [\#19](https://github.com/amondnet/now-deployment/issues/19) 30 | 31 | **Fixed bugs:** 32 | 33 | - undefined url on pull request comment [\#37](https://github.com/amondnet/now-deployment/issues/37) 34 | - Branch is undefined [\#31](https://github.com/amondnet/now-deployment/issues/31) 35 | - Outputs object is always empty [\#25](https://github.com/amondnet/now-deployment/issues/25) 36 | - Fix empty output object [\#38](https://github.com/amondnet/now-deployment/pull/38) ([hakonkrogh](https://github.com/hakonkrogh)) 37 | - fix: branch is undefined [\#33](https://github.com/amondnet/now-deployment/pull/33) ([amondnet](https://github.com/amondnet)) 38 | 39 | **Closed issues:** 40 | 41 | - Validation failed: commit\_id has been locked when deploying multiple projects [\#21](https://github.com/amondnet/now-deployment/issues/21) 42 | 43 | **Merged pull requests:** 44 | 45 | - chore\(release\): 2.0.2 [\#39](https://github.com/amondnet/now-deployment/pull/39) ([amondnet](https://github.com/amondnet)) 46 | - docs\(README\): Update documentation regarding github secrets [\#35](https://github.com/amondnet/now-deployment/pull/35) ([amalv](https://github.com/amalv)) 47 | 48 | ## [v2.0.1](https://github.com/amondnet/now-deployment/tree/v2.0.1) (2020-02-25) 49 | 50 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v2.0.0...v2.0.1) 51 | 52 | **Fixed bugs:** 53 | 54 | - fix: outputs object is always empty [\#29](https://github.com/amondnet/now-deployment/pull/29) ([amondnet](https://github.com/amondnet)) 55 | 56 | **Closed issues:** 57 | 58 | - How can I deploy with an assigned domain? [\#30](https://github.com/amondnet/now-deployment/issues/30) 59 | - Add instruction on getting `project\_id` and `org\_id` [\#27](https://github.com/amondnet/now-deployment/issues/27) 60 | 61 | **Merged pull requests:** 62 | 63 | - docs: how to get organization and project id of project [\#28](https://github.com/amondnet/now-deployment/pull/28) ([amondnet](https://github.com/amondnet)) 64 | 65 | ## [v2.0.0](https://github.com/amondnet/now-deployment/tree/v2.0.0) (2020-02-18) 66 | 67 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v1.2.0...v2.0.0) 68 | 69 | **Implemented enhancements:** 70 | 71 | - Do not want to receive comments from action [\#14](https://github.com/amondnet/now-deployment/issues/14) 72 | - Support for Vercel CLI v17 [\#24](https://github.com/amondnet/now-deployment/issues/24) 73 | - feat: now cli v17, add `NOW\_PROJECT\_ID` and `NOW\_ORG\_ID` env variable [\#26](https://github.com/amondnet/now-deployment/pull/26) ([amondnet](https://github.com/amondnet)) 74 | 75 | **Fixed bugs:** 76 | 77 | - Deploy stalled [\#23](https://github.com/amondnet/now-deployment/issues/23) 78 | 79 | **Closed issues:** 80 | 81 | - Can I upload the contents of a folder with pre-built assets? [\#22](https://github.com/amondnet/now-deployment/issues/22) 82 | - getting 403 error every time it tries to comment [\#18](https://github.com/amondnet/now-deployment/issues/18) 83 | - Feature: Ability to specify path for --local-config flag [\#16](https://github.com/amondnet/now-deployment/issues/16) 84 | 85 | ## [v1.2.0](https://github.com/amondnet/now-deployment/tree/v1.2.0) (2020-01-28) 86 | 87 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v1...v1.2.0) 88 | 89 | **Implemented enhancements:** 90 | 91 | - feat: github comment optional [\#20](https://github.com/amondnet/now-deployment/pull/20) ([amondnet](https://github.com/amondnet)) 92 | 93 | ## [v1.1.0](https://github.com/amondnet/now-deployment/tree/v1.1.0) (2020-01-17) 94 | 95 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v1.0.1...v1.1.0) 96 | 97 | **Implemented enhancements:** 98 | 99 | - feature: add working dir input [\#17](https://github.com/amondnet/now-deployment/pull/17) ([foxundermoon](https://github.com/foxundermoon)) 100 | 101 | **Fixed bugs:** 102 | 103 | - Built with commit undefined [\#9](https://github.com/amondnet/now-deployment/issues/9) 104 | - Add prod args have an error invalidTagName [\#6](https://github.com/amondnet/now-deployment/issues/6) 105 | - fix: built with commit undefined [\#10](https://github.com/amondnet/now-deployment/pull/10) ([amondnet](https://github.com/amondnet)) 106 | - fix now-args bug [\#8](https://github.com/amondnet/now-deployment/pull/8) ([foxundermoon](https://github.com/foxundermoon)) 107 | - Update action.yml [\#7](https://github.com/amondnet/now-deployment/pull/7) ([foxundermoon](https://github.com/foxundermoon)) 108 | - fix: commit author [\#4](https://github.com/amondnet/now-deployment/pull/4) ([amondnet](https://github.com/amondnet)) 109 | - fix: typo in argument [\#3](https://github.com/amondnet/now-deployment/pull/3) ([amalv](https://github.com/amalv)) 110 | 111 | **Closed issues:** 112 | 113 | - Can't unlink a previous Org connection if I no longer have access to org [\#15](https://github.com/amondnet/now-deployment/issues/15) 114 | - How to deploy from other folders such as build [\#13](https://github.com/amondnet/now-deployment/issues/13) 115 | - Deployment succeeds but workflow reports failure [\#12](https://github.com/amondnet/now-deployment/issues/12) 116 | 117 | **Merged pull requests:** 118 | 119 | - release: v1 [\#1](https://github.com/amondnet/now-deployment/pull/1) ([amondnet](https://github.com/amondnet)) 120 | 121 | 122 | 123 | \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* 124 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Builder 2 | 3 | _A GitHub Action to connect apps to vercel._ 4 | 5 | _Used by docs eng to build within GI/CD pipelines._ 6 | 7 | 8 | ## Inputs 9 | 10 | | Name | Required | Default | Description | 11 | |---------------------|:------------------------:|---------|---------------------------------------------------------------------------------------------------| 12 | | vercel-token |
  • - [x]
  • | | Vercel token. see https://vercel.com/account/tokens | 13 | | github-comment |
    • - [ ]
    • | true | Its type can be either **string or boolean**. When string, it leaves PR a comment with the string. When boolean, it leaves PR a default comment(true) or does not leave a comment at all(false). | 14 | | github-token |
      • - [ ]
      • | | if you want to comment on pull request or commit. `${{ secrets.GITHUB_TOKEN }}` ([GitHub token docs](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)) | 15 | | vercel-project-id |
        • - [x]
        • | | ❗Vercel CLI 17+,The `name` property in vercel.json is deprecated (https://zeit.ink/5F) | 16 | | vercel-org-id |
          • - [x]
          • | | ❗Vercel CLI 17+,The `name` property in vercel.json is deprecated (https://zeit.ink/5F) | 17 | | vercel-args |
            • - [ ]
            • | | This is optional args for `vercel` cli. Example: `--prod` | 18 | | working-directory |
              • - [ ]
              • | | the working directory | 19 | | scope |
                • - [ ]
                • | | If you are working in a team scope, you should set this value to your `team ID`. 20 | | alias-domains |
                  • - [ ]
                  • | | You can assign a domain to this deployment. Please note that this domain must have been configured in the project. You can use pull request number via `{{PR_NUMBER}}` and branch via `{{BRANCH}}`. 21 | | vercel-project-name |
                    • - [ ]
                    • | | The name of the project; if absent we'll use the `vercel inspect` command to determine. [#27](https://github.com/amondnet/vercel-action/issues/27) & [#28](https://github.com/amondnet/vercel-action/issues/28) 22 | | vercel-version |
                      • - [x]
                      • | | vercel-cli package version if absent we will use one declared in [package.json](https://github.com/amondnet/vercel-action/blob/master/package.json) 23 | ## Outputs 24 | 25 | ### `preview-url` 26 | 27 | The url of deployment preview. 28 | 29 | ### `preview-name` 30 | 31 | The name of deployment name. 32 | 33 | ## How To Use 34 | 35 | ### Disable Vercel for GitHub 36 | 37 | > The Vercel for GitHub integration automatically deploys your GitHub projects with Vercel, providing Preview Deployment URLs, and automatic Custom Domain updates. 38 | [link](https://vercel.com/docs/v2/git-integrations) 39 | 40 | We would like to to use `github actions` for build and deploy instead of `Vercel`. 41 | 42 | Set `github.enabled: false` in `vercel.json`, see example `vercel.json` file below: 43 | 44 | ```json 45 | { 46 | "version": 2, 47 | "public": false, 48 | "github": { 49 | "enabled": false 50 | } 51 | } 52 | 53 | ``` 54 | When `github.enabled` set to `false`, `Vercel for GitHub` will not deploy the given project regardless of the GitHub app being installed. 55 | 56 | ### Skip vercel's build step 57 | 58 | Since we do the `build` in `github actions`, we don't need to build in `vercel`. 59 | 60 | #### Method 1 - via vercel interface 61 | 62 | - Specify "Other" as the framework preset, and 63 | - Enable the Override option for the Build Command, and 64 | - Leave the Build Command **empty**. 65 | - This will prevent the build from being attempted and serve your content as-is. 66 | 67 | See [docs](https://vercel.com/docs/concepts/deployments/build-step#build-command) for more details 68 | 69 | #### Method 2 - via `vercel.json` 70 | 71 | If a Deployment defines the builds configuration property, the vercel's `Build & Development Settings` are ignored. 72 | 73 | ```json 74 | { 75 | "builds": [ 76 | { "src": "{{Source for distribution}}", "use": "@vercel/static" } 77 | ] 78 | } 79 | ``` 80 | Set `builds` to `@vercel/static` to skip vercel's build step. `src` is the path to the directory containing the files to be deployed. 81 | 82 | See [docs](https://vercel.com/docs/cli#legacy/builds) for more details 83 | 84 | 85 | ### Project Linking 86 | 87 | You should link a project via [Vercel CLI](https://vercel.com/download) in locally. 88 | 89 | When running `vercel` in a directory for the first time, [Vercel CLI](https://vercel.com/download) needs to know which scope and Project you want to deploy your directory to. You can choose to either link an existing project or to create a new one. 90 | 91 | > NOTE: Project linking requires at least version 17 of [Vercel CLI](https://vercel.com/download). If you have an earlier version, please [update](https://vercel.com/guides/updating-vercel-cli) to the latest version. 92 | 93 | ```bash 94 | vercel 95 | ``` 96 | 97 | ```bash 98 | ? Set up and deploy “~/web/my-lovely-project”? [Y/n] y 99 | ? Which scope do you want to deploy to? My Awesome Team 100 | ? Link to existing project? [y/N] y 101 | ? What’s the name of your existing project? my-lovely-project 102 | 🔗 Linked to awesome-team/my-lovely-project (created .vercel and added it to .gitignore) 103 | ``` 104 | 105 | Once set up, a new `.vercel` directory will be added to your directory. The `.vercel` directory contains both the organization(`vercel-org-id`) and project(`vercel-project-id`) id of your project. 106 | 107 | ```json 108 | {"orgId":"example_org_id","projectId":"example_project_id"} 109 | ``` 110 | 111 | You can save both values in the secrets setting in your repository. Read the [Official documentation](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) if you want further info on how secrets work on Github. 112 | 113 | ### Github Actions 114 | 115 | * This is a complete `.github/workflows/deploy.yml` example. 116 | 117 | Set the `vercel-project-id` and `vercel-org-id` you found above. 118 | 119 | ```yaml 120 | name: deploy website 121 | on: [pull_request] 122 | jobs: 123 | deploy: 124 | runs-on: ubuntu-latest 125 | steps: 126 | - uses: actions/checkout@v2 127 | # your build commands 128 | # - run: | 129 | # ng build --prod 130 | - uses: amondnet/vercel-action@v20 #deploy 131 | with: 132 | vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required 133 | github-token: ${{ secrets.GITHUB_TOKEN }} #Optional 134 | vercel-args: '--prod' #Optional 135 | vercel-org-id: ${{ secrets.ORG_ID}} #Required 136 | vercel-project-id: ${{ secrets.PROJECT_ID}} #Required 137 | working-directory: ./sub-directory 138 | ``` 139 | 140 | 141 | ### Angular Example 142 | 143 | See [.github/workflows/example-angular.yml](/.github/workflows/example-angular.yml) , 144 | 145 | 146 | ### Basic Auth Example 147 | 148 | How to add Basic Authentication to a Vercel deployment 149 | 150 | See [.github/workflows/example-express-basic-auth.yml](.github/workflows/example-express-basic-auth.yml) 151 | 152 | [source code](https://github.com/amondnet/vercel-action/tree/master/example/express-basic-auth) 153 | 154 | | `@now/node-server` is deprecated and stopped working. Use `@vercel/node` instead. #61 155 | 156 | ### Alias Domains 157 | 158 | You can assign a domain to this deployment. Please note that this domain must have been [configured](https://vercel.com/docs/v2/custom-domains#adding-a-domain) in the project. 159 | 160 | If you want to assign domain to branch or pr, you should add [Wildcard Domain](https://vercel.com/docs/v2/custom-domains#wildcard-domains). 161 | 162 | You can use pull request number via `{{PR_NUMBER}}` and branch via `{{BRANCH}}` 163 | 164 | #### Example 165 | 166 | Wildcard Domains : *.angular.vercel-action.amond.dev 167 | 168 | *Per Pull Request* 169 | 170 | https://pr-{{PR_NUMBER}}.angular.vercel-action.amond.dev 171 | 172 | - PR-1 -> https://pr-1.angular.vercel-action.amond.dev 173 | - PR-2 -> https://pr-2.angular.vercel-action.amond.dev 174 | 175 | *Per Branch* 176 | 177 | https://{{BRANCH}}.angular.vercel-action.amond.dev 178 | 179 | - develop -> https://develop.angular.vercel-action.amond.dev 180 | - master -> https://master.angular.vercel-action.amond.dev 181 | - master -> https://master.angular.vercel-action.amond.dev 182 | 183 | 184 | 185 | See [.github/workflows/example-angular.yml](/.github/workflows/example-angular.yml) 186 | 187 | ```yaml 188 | name: deploy website 189 | on: [pull_request] 190 | jobs: 191 | deploy: 192 | runs-on: ubuntu-latest 193 | steps: 194 | - uses: actions/checkout@v2 195 | - uses: amondnet/vercel-action@v19 196 | with: 197 | vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required 198 | github-token: ${{ secrets.GITHUB_TOKEN }} #Optional 199 | vercel-args: '--prod' #Optional 200 | vercel-org-id: ${{ secrets.ORG_ID}} #Required 201 | vercel-project-id: ${{ secrets.PROJECT_ID}} #Required 202 | working-directory: ./sub-directory #Your Working Directory, Optional 203 | alias-domains: | #Optional 204 | staging.angular.vercel-action.amond.dev 205 | pr-{{PR_NUMBER}}.angular.vercel-action.amond.dev 206 | ``` 207 | 208 | 209 | 210 | ## Migration from v2 211 | 212 | 1. Change action name in `workflows` from `now-deployment` to `vercel-action` 213 | ```yaml 214 | - name: Vercel Action 215 | uses: amondnet/vercel-action@v19 216 | ``` 217 | 2. Change input values. 218 | - `zeit-token` -> `vercel-token` 219 | - `now-org-id` -> `vercel-org-id` 220 | - `now-project-id` -> `vercel-project-id` 221 | 222 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const { stripIndents } = require('common-tags'); 2 | const core = require('@actions/core'); 3 | const github = require('@actions/github'); 4 | const { execSync } = require('child_process'); 5 | const exec = require('@actions/exec'); 6 | const packageJSON = require('./package.json'); 7 | 8 | function getGithubCommentInput() { 9 | const input = core.getInput('github-comment'); 10 | if (input === 'true') return true; 11 | if (input === 'false') return false; 12 | return input; 13 | } 14 | 15 | const { context } = github; 16 | 17 | const githubToken = core.getInput('github-token'); 18 | const githubComment = getGithubCommentInput(); 19 | const workingDirectory = core.getInput('working-directory'); 20 | const prNumberRegExp = /{{\s*PR_NUMBER\s*}}/g; 21 | const branchRegExp = /{{\s*BRANCH\s*}}/g; 22 | 23 | function isPullRequestType(event) { 24 | return event.startsWith('pull_request'); 25 | } 26 | 27 | function slugify(str) { 28 | const slug = str 29 | .toString() 30 | .trim() 31 | .toLowerCase() 32 | .replace(/[_\s]+/g, '-') 33 | .replace(/[^\w-]+/g, '') 34 | .replace(/--+/g, '-') 35 | .replace(/^-+/, '') 36 | .replace(/-+$/, ''); 37 | core.debug(`before slugify: "${str}"; after slugify: "${slug}"`); 38 | return slug; 39 | } 40 | 41 | function retry(fn, retries) { 42 | async function attempt(retry) { 43 | try { 44 | return await fn(); 45 | } catch (error) { 46 | if (retry > retries) { 47 | throw error; 48 | } else { 49 | core.info(`retrying: attempt ${retry + 1} / ${retries + 1}`); 50 | await new Promise(resolve => setTimeout(resolve, 3000)); 51 | return attempt(retry + 1); 52 | } 53 | } 54 | } 55 | return attempt(1); 56 | } 57 | 58 | // Vercel 59 | function getVercelBin() { 60 | const input = core.getInput('vercel-version'); 61 | const fallback = packageJSON.dependencies.vercel; 62 | return `vercel@${input || fallback}`; 63 | } 64 | 65 | const vercelToken = core.getInput('vercel-token', { required: true }); 66 | const vercelArgs = core.getInput('vercel-args'); 67 | const vercelOrgId = core.getInput('vercel-org-id'); 68 | const vercelProjectId = core.getInput('vercel-project-id'); 69 | const vercelScope = core.getInput('scope'); 70 | const vercelProjectName = core.getInput('vercel-project-name'); 71 | const vercelBin = getVercelBin(); 72 | const aliasDomains = core 73 | .getInput('alias-domains') 74 | .split('\n') 75 | .filter(x => x !== '') 76 | .map(s => { 77 | let url = s; 78 | let branch = slugify(context.ref.replace('refs/heads/', '')); 79 | if (isPullRequestType(context.eventName)) { 80 | const pr = 81 | context.payload.pull_request || context.payload.pull_request_target; 82 | branch = slugify(pr.head.ref.replace('refs/heads/', '')); 83 | url = url.replace(prNumberRegExp, context.issue.number.toString()); 84 | } 85 | url = url.replace(branchRegExp, branch); 86 | 87 | return url; 88 | }); 89 | 90 | let octokit; 91 | if (githubToken) { 92 | octokit = new github.GitHub(githubToken); 93 | } 94 | 95 | async function setEnv() { 96 | core.info('set environment for vercel cli'); 97 | if (vercelOrgId) { 98 | core.info('set env variable : VERCEL_ORG_ID'); 99 | core.exportVariable('VERCEL_ORG_ID', vercelOrgId); 100 | } 101 | if (vercelProjectId) { 102 | core.info('set env variable : VERCEL_PROJECT_ID'); 103 | core.exportVariable('VERCEL_PROJECT_ID', vercelProjectId); 104 | } 105 | } 106 | 107 | function addVercelMetadata(key, value, providedArgs) { 108 | // returns a list for the metadata commands if key was not supplied by user in action parameters 109 | // returns an empty list if key was provided by user 110 | const pattern = `^${key}=.+`; 111 | const metadataRegex = new RegExp(pattern, 'g'); 112 | // eslint-disable-next-line no-restricted-syntax 113 | for (const arg of providedArgs) { 114 | if (arg.match(metadataRegex)) { 115 | return []; 116 | } 117 | } 118 | 119 | return ['-m', `${key}=${value}`]; 120 | } 121 | 122 | async function vercelDeploy(ref, commit) { 123 | let myOutput = ''; 124 | // eslint-disable-next-line no-unused-vars 125 | let myError = ''; 126 | const options = {}; 127 | options.listeners = { 128 | stdout: data => { 129 | myOutput += data.toString(); 130 | core.info(data.toString()); 131 | }, 132 | stderr: data => { 133 | // eslint-disable-next-line no-unused-vars 134 | myError += data.toString(); 135 | core.info(data.toString()); 136 | }, 137 | }; 138 | if (workingDirectory) { 139 | options.cwd = workingDirectory; 140 | } 141 | 142 | const providedArgs = vercelArgs.split(/ +/); 143 | 144 | const args = [ 145 | ...vercelArgs.split(/ +/), 146 | ...['-t', vercelToken], 147 | ...addVercelMetadata('githubCommitSha', context.sha, providedArgs), 148 | ...addVercelMetadata('githubCommitAuthorName', context.actor, providedArgs), 149 | ...addVercelMetadata( 150 | 'githubCommitAuthorLogin', 151 | context.actor, 152 | providedArgs, 153 | ), 154 | ...addVercelMetadata('githubDeployment', 1, providedArgs), 155 | ...addVercelMetadata('githubOrg', context.repo.owner, providedArgs), 156 | ...addVercelMetadata('githubRepo', context.repo.repo, providedArgs), 157 | ...addVercelMetadata('githubCommitOrg', context.repo.owner, providedArgs), 158 | ...addVercelMetadata('githubCommitRepo', context.repo.repo, providedArgs), 159 | ...addVercelMetadata('githubCommitMessage', `"${commit}"`, providedArgs), 160 | ...addVercelMetadata( 161 | 'githubCommitRef', 162 | ref.replace('refs/heads/', ''), 163 | providedArgs, 164 | ), 165 | ]; 166 | 167 | if (vercelScope) { 168 | core.info('using scope'); 169 | args.push('--scope', vercelScope); 170 | } 171 | 172 | await exec.exec('npx', [vercelBin, ...args], options); 173 | 174 | return myOutput; 175 | } 176 | 177 | async function vercelInspect(deploymentUrl) { 178 | // eslint-disable-next-line no-unused-vars 179 | let myOutput = ''; 180 | let myError = ''; 181 | const options = {}; 182 | options.listeners = { 183 | stdout: data => { 184 | // eslint-disable-next-line no-unused-vars 185 | myOutput += data.toString(); 186 | core.info(data.toString()); 187 | }, 188 | stderr: data => { 189 | myError += data.toString(); 190 | core.info(data.toString()); 191 | }, 192 | }; 193 | if (workingDirectory) { 194 | options.cwd = workingDirectory; 195 | } 196 | 197 | const args = [vercelBin, 'inspect', deploymentUrl, '-t', vercelToken]; 198 | 199 | if (vercelScope) { 200 | core.info('using scope'); 201 | args.push('--scope', vercelScope); 202 | } 203 | await exec.exec('npx', args, options); 204 | 205 | const match = myError.match(/^\s+name\s+(.+)$/m); 206 | return match && match.length ? match[1] : null; 207 | } 208 | 209 | async function findCommentsForEvent() { 210 | core.debug('find comments for event'); 211 | if (context.eventName === 'push') { 212 | core.debug('event is "commit", use "listCommentsForCommit"'); 213 | return octokit.repos.listCommentsForCommit({ 214 | ...context.repo, 215 | commit_sha: context.sha, 216 | }); 217 | } 218 | if (isPullRequestType(context.eventName)) { 219 | core.debug(`event is "${context.eventName}", use "listComments"`); 220 | return octokit.issues.listComments({ 221 | ...context.repo, 222 | issue_number: context.issue.number, 223 | }); 224 | } 225 | core.error('not supported event_type'); 226 | return []; 227 | } 228 | 229 | async function findPreviousComment(text) { 230 | if (!octokit) { 231 | return null; 232 | } 233 | core.info('find comment'); 234 | const { data: comments } = await findCommentsForEvent(); 235 | 236 | const vercelPreviewURLComment = comments.find(comment => 237 | comment.body.startsWith(text), 238 | ); 239 | if (vercelPreviewURLComment) { 240 | core.info('previous comment found'); 241 | return vercelPreviewURLComment.id; 242 | } 243 | core.info('previous comment not found'); 244 | return null; 245 | } 246 | 247 | function joinDeploymentUrls(deploymentUrl, aliasDomains_) { 248 | if (aliasDomains_.length) { 249 | const aliasUrls = aliasDomains_.map(domain => `https://${domain}`); 250 | return [deploymentUrl, ...aliasUrls].join('\n'); 251 | } 252 | return deploymentUrl; 253 | } 254 | 255 | function buildCommentPrefix(deploymentName) { 256 | return `:rocket: Built _${deploymentName}_ successfully!`; 257 | } 258 | 259 | function buildCommentBody(deploymentCommit, deploymentUrl, deploymentName) { 260 | if (!githubComment) { 261 | return undefined; 262 | } 263 | const prefix = `${buildCommentPrefix(deploymentName)}\n\n`; 264 | 265 | const rawGithubComment = 266 | prefix + 267 | 268 | (typeof githubComment === 'string' || githubComment instanceof String 269 | ? githubComment 270 | : stripIndents` 271 | 272 | * ${joinDeploymentUrls(deploymentUrl, aliasDomains)} 273 | 274 | * Built with commit ${deploymentCommit} 275 | 276 | > Issues? Visit #docs-elastic-dev in Slack 277 | `); 278 | 279 | return rawGithubComment 280 | .replace(/\{\{deploymentCommit\}\}/g, deploymentCommit) 281 | .replace(/\{\{deploymentName\}\}/g, deploymentName) 282 | .replace( 283 | /\{\{deploymentUrl\}\}/g, 284 | joinDeploymentUrls(deploymentUrl, aliasDomains), 285 | ); 286 | } 287 | 288 | async function createCommentOnCommit( 289 | deploymentCommit, 290 | deploymentUrl, 291 | deploymentName, 292 | ) { 293 | if (!octokit) { 294 | return; 295 | } 296 | const commentId = await findPreviousComment( 297 | buildCommentPrefix(deploymentName), 298 | ); 299 | 300 | const commentBody = buildCommentBody( 301 | deploymentCommit, 302 | deploymentUrl, 303 | deploymentName, 304 | ); 305 | 306 | if (commentId) { 307 | await octokit.repos.updateCommitComment({ 308 | ...context.repo, 309 | comment_id: commentId, 310 | body: commentBody, 311 | }); 312 | } else { 313 | await octokit.repos.createCommitComment({ 314 | ...context.repo, 315 | commit_sha: context.sha, 316 | body: commentBody, 317 | }); 318 | } 319 | } 320 | 321 | async function createCommentOnPullRequest( 322 | deploymentCommit, 323 | deploymentUrl, 324 | deploymentName, 325 | ) { 326 | if (!octokit) { 327 | return; 328 | } 329 | const commentId = await findPreviousComment( 330 | `:rocket: Built _${deploymentName}_ successfully!`, 331 | ); 332 | 333 | const commentBody = buildCommentBody( 334 | deploymentCommit, 335 | deploymentUrl, 336 | deploymentName, 337 | ); 338 | 339 | if (commentId) { 340 | await octokit.issues.updateComment({ 341 | ...context.repo, 342 | comment_id: commentId, 343 | body: commentBody, 344 | }); 345 | } else { 346 | await octokit.issues.createComment({ 347 | ...context.repo, 348 | issue_number: context.issue.number, 349 | body: commentBody, 350 | }); 351 | } 352 | } 353 | 354 | async function aliasDomainsToDeployment(deploymentUrl) { 355 | if (!deploymentUrl) { 356 | core.error('deployment url is null'); 357 | } 358 | const args = ['-t', vercelToken]; 359 | if (vercelScope) { 360 | core.info('using scope'); 361 | args.push('--scope', vercelScope); 362 | } 363 | const promises = aliasDomains.map(domain => 364 | retry( 365 | () => 366 | exec.exec('npx', [vercelBin, ...args, 'alias', deploymentUrl, domain]), 367 | 2, 368 | ), 369 | ); 370 | 371 | await Promise.all(promises); 372 | } 373 | 374 | async function run() { 375 | core.debug(`action : ${context.action}`); 376 | core.debug(`ref : ${context.ref}`); 377 | core.debug(`eventName : ${context.eventName}`); 378 | core.debug(`actor : ${context.actor}`); 379 | core.debug(`sha : ${context.sha}`); 380 | core.debug(`workflow : ${context.workflow}`); 381 | let { ref } = context; 382 | let { sha } = context; 383 | await setEnv(); 384 | 385 | let commit = execSync('git log -1 --pretty=format:%B') 386 | .toString() 387 | .trim(); 388 | if (github.context.eventName === 'push') { 389 | const pushPayload = github.context.payload; 390 | core.debug(`The head commit is: ${pushPayload.head_commit}`); 391 | } else if (isPullRequestType(github.context.eventName)) { 392 | const pullRequestPayload = github.context.payload; 393 | const pr = 394 | pullRequestPayload.pull_request || pullRequestPayload.pull_request_target; 395 | core.debug(`head : ${pr.head}`); 396 | 397 | ref = pr.head.ref; 398 | sha = pr.head.sha; 399 | core.debug(`The head ref is: ${pr.head.ref}`); 400 | core.debug(`The head sha is: ${pr.head.sha}`); 401 | 402 | if (octokit) { 403 | const { data: commitData } = await octokit.git.getCommit({ 404 | ...context.repo, 405 | commit_sha: sha, 406 | }); 407 | commit = commitData.message; 408 | core.debug(`The head commit is: ${commit}`); 409 | } 410 | } 411 | 412 | const deploymentUrl = await vercelDeploy(ref, commit); 413 | 414 | if (deploymentUrl) { 415 | core.info('set preview-url output'); 416 | if (aliasDomains && aliasDomains.length) { 417 | core.info('set preview-url output as first alias'); 418 | core.setOutput('preview-url', `https://${aliasDomains[0]}`); 419 | } else { 420 | core.setOutput('preview-url', deploymentUrl); 421 | } 422 | } else { 423 | core.warning('get preview-url error'); 424 | } 425 | 426 | const deploymentName = 427 | vercelProjectName || (await vercelInspect(deploymentUrl)); 428 | if (deploymentName) { 429 | core.info('set preview-name output'); 430 | core.setOutput('preview-name', deploymentName); 431 | } else { 432 | core.warning('get preview-name error'); 433 | } 434 | 435 | if (aliasDomains.length) { 436 | core.info('alias domains to this deployment'); 437 | await aliasDomainsToDeployment(deploymentUrl); 438 | } 439 | 440 | if (githubComment && githubToken) { 441 | if (context.issue.number) { 442 | core.info('this is related issue or pull_request'); 443 | await createCommentOnPullRequest(sha, deploymentUrl, deploymentName); 444 | } else if (context.eventName === 'push') { 445 | core.info('this is push event'); 446 | await createCommentOnCommit(sha, deploymentUrl, deploymentName); 447 | } 448 | } else { 449 | core.info('comment : disabled'); 450 | } 451 | } 452 | 453 | run().catch(error => { 454 | core.setFailed(`••• ERROR: ${error.message} •••`); 455 | }); 456 | -------------------------------------------------------------------------------- /example/express-basic-auth/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-basic-auth-example", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "accepts": { 8 | "version": "1.3.7", 9 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 10 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 11 | "requires": { 12 | "mime-types": "~2.1.24", 13 | "negotiator": "0.6.2" 14 | } 15 | }, 16 | "array-flatten": { 17 | "version": "1.1.1", 18 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 19 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 20 | }, 21 | "basic-auth": { 22 | "version": "2.0.1", 23 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", 24 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", 25 | "requires": { 26 | "safe-buffer": "5.1.2" 27 | } 28 | }, 29 | "body-parser": { 30 | "version": "1.19.0", 31 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 32 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 33 | "requires": { 34 | "bytes": "3.1.0", 35 | "content-type": "~1.0.4", 36 | "debug": "2.6.9", 37 | "depd": "~1.1.2", 38 | "http-errors": "1.7.2", 39 | "iconv-lite": "0.4.24", 40 | "on-finished": "~2.3.0", 41 | "qs": "6.7.0", 42 | "raw-body": "2.4.0", 43 | "type-is": "~1.6.17" 44 | } 45 | }, 46 | "bytes": { 47 | "version": "3.1.0", 48 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 49 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 50 | }, 51 | "content-disposition": { 52 | "version": "0.5.3", 53 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 54 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 55 | "requires": { 56 | "safe-buffer": "5.1.2" 57 | } 58 | }, 59 | "content-type": { 60 | "version": "1.0.4", 61 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 62 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 63 | }, 64 | "cookie": { 65 | "version": "0.4.0", 66 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 67 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 68 | }, 69 | "cookie-signature": { 70 | "version": "1.0.6", 71 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 72 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 73 | }, 74 | "debug": { 75 | "version": "2.6.9", 76 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 77 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 78 | "requires": { 79 | "ms": "2.0.0" 80 | } 81 | }, 82 | "depd": { 83 | "version": "1.1.2", 84 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 85 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 86 | }, 87 | "destroy": { 88 | "version": "1.0.4", 89 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 90 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 91 | }, 92 | "ee-first": { 93 | "version": "1.1.1", 94 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 95 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 96 | }, 97 | "encodeurl": { 98 | "version": "1.0.2", 99 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 100 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 101 | }, 102 | "escape-html": { 103 | "version": "1.0.3", 104 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 105 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 106 | }, 107 | "etag": { 108 | "version": "1.8.1", 109 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 110 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 111 | }, 112 | "express": { 113 | "version": "4.17.1", 114 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 115 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 116 | "requires": { 117 | "accepts": "~1.3.7", 118 | "array-flatten": "1.1.1", 119 | "body-parser": "1.19.0", 120 | "content-disposition": "0.5.3", 121 | "content-type": "~1.0.4", 122 | "cookie": "0.4.0", 123 | "cookie-signature": "1.0.6", 124 | "debug": "2.6.9", 125 | "depd": "~1.1.2", 126 | "encodeurl": "~1.0.2", 127 | "escape-html": "~1.0.3", 128 | "etag": "~1.8.1", 129 | "finalhandler": "~1.1.2", 130 | "fresh": "0.5.2", 131 | "merge-descriptors": "1.0.1", 132 | "methods": "~1.1.2", 133 | "on-finished": "~2.3.0", 134 | "parseurl": "~1.3.3", 135 | "path-to-regexp": "0.1.7", 136 | "proxy-addr": "~2.0.5", 137 | "qs": "6.7.0", 138 | "range-parser": "~1.2.1", 139 | "safe-buffer": "5.1.2", 140 | "send": "0.17.1", 141 | "serve-static": "1.14.1", 142 | "setprototypeof": "1.1.1", 143 | "statuses": "~1.5.0", 144 | "type-is": "~1.6.18", 145 | "utils-merge": "1.0.1", 146 | "vary": "~1.1.2" 147 | } 148 | }, 149 | "express-basic-auth": { 150 | "version": "1.2.0", 151 | "resolved": "https://registry.npmjs.org/express-basic-auth/-/express-basic-auth-1.2.0.tgz", 152 | "integrity": "sha512-iJ0h1Gk6fZRrFmO7tP9nIbxwNgCUJASfNj5fb0Hy15lGtbqqsxpt7609+wq+0XlByZjXmC/rslWQtnuSTVRIcg==", 153 | "requires": { 154 | "basic-auth": "^2.0.1" 155 | } 156 | }, 157 | "finalhandler": { 158 | "version": "1.1.2", 159 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 160 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 161 | "requires": { 162 | "debug": "2.6.9", 163 | "encodeurl": "~1.0.2", 164 | "escape-html": "~1.0.3", 165 | "on-finished": "~2.3.0", 166 | "parseurl": "~1.3.3", 167 | "statuses": "~1.5.0", 168 | "unpipe": "~1.0.0" 169 | } 170 | }, 171 | "forwarded": { 172 | "version": "0.1.2", 173 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 174 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 175 | }, 176 | "fresh": { 177 | "version": "0.5.2", 178 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 179 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 180 | }, 181 | "http-errors": { 182 | "version": "1.7.2", 183 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 184 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 185 | "requires": { 186 | "depd": "~1.1.2", 187 | "inherits": "2.0.3", 188 | "setprototypeof": "1.1.1", 189 | "statuses": ">= 1.5.0 < 2", 190 | "toidentifier": "1.0.0" 191 | } 192 | }, 193 | "iconv-lite": { 194 | "version": "0.4.24", 195 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 196 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 197 | "requires": { 198 | "safer-buffer": ">= 2.1.2 < 3" 199 | } 200 | }, 201 | "inherits": { 202 | "version": "2.0.3", 203 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 204 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 205 | }, 206 | "ipaddr.js": { 207 | "version": "1.9.1", 208 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 209 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 210 | }, 211 | "media-typer": { 212 | "version": "0.3.0", 213 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 214 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 215 | }, 216 | "merge-descriptors": { 217 | "version": "1.0.1", 218 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 219 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 220 | }, 221 | "methods": { 222 | "version": "1.1.2", 223 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 224 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 225 | }, 226 | "mime": { 227 | "version": "1.6.0", 228 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 229 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 230 | }, 231 | "mime-db": { 232 | "version": "1.44.0", 233 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 234 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" 235 | }, 236 | "mime-types": { 237 | "version": "2.1.27", 238 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 239 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 240 | "requires": { 241 | "mime-db": "1.44.0" 242 | } 243 | }, 244 | "ms": { 245 | "version": "2.0.0", 246 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 247 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 248 | }, 249 | "negotiator": { 250 | "version": "0.6.2", 251 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 252 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 253 | }, 254 | "on-finished": { 255 | "version": "2.3.0", 256 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 257 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 258 | "requires": { 259 | "ee-first": "1.1.1" 260 | } 261 | }, 262 | "parseurl": { 263 | "version": "1.3.3", 264 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 265 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 266 | }, 267 | "path-to-regexp": { 268 | "version": "0.1.7", 269 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 270 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 271 | }, 272 | "proxy-addr": { 273 | "version": "2.0.6", 274 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", 275 | "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", 276 | "requires": { 277 | "forwarded": "~0.1.2", 278 | "ipaddr.js": "1.9.1" 279 | } 280 | }, 281 | "qs": { 282 | "version": "6.7.0", 283 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 284 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 285 | }, 286 | "range-parser": { 287 | "version": "1.2.1", 288 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 289 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 290 | }, 291 | "raw-body": { 292 | "version": "2.4.0", 293 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 294 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 295 | "requires": { 296 | "bytes": "3.1.0", 297 | "http-errors": "1.7.2", 298 | "iconv-lite": "0.4.24", 299 | "unpipe": "1.0.0" 300 | } 301 | }, 302 | "safe-buffer": { 303 | "version": "5.1.2", 304 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 305 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 306 | }, 307 | "safer-buffer": { 308 | "version": "2.1.2", 309 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 310 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 311 | }, 312 | "send": { 313 | "version": "0.17.1", 314 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 315 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 316 | "requires": { 317 | "debug": "2.6.9", 318 | "depd": "~1.1.2", 319 | "destroy": "~1.0.4", 320 | "encodeurl": "~1.0.2", 321 | "escape-html": "~1.0.3", 322 | "etag": "~1.8.1", 323 | "fresh": "0.5.2", 324 | "http-errors": "~1.7.2", 325 | "mime": "1.6.0", 326 | "ms": "2.1.1", 327 | "on-finished": "~2.3.0", 328 | "range-parser": "~1.2.1", 329 | "statuses": "~1.5.0" 330 | }, 331 | "dependencies": { 332 | "ms": { 333 | "version": "2.1.1", 334 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 335 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 336 | } 337 | } 338 | }, 339 | "serve-static": { 340 | "version": "1.14.1", 341 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 342 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 343 | "requires": { 344 | "encodeurl": "~1.0.2", 345 | "escape-html": "~1.0.3", 346 | "parseurl": "~1.3.3", 347 | "send": "0.17.1" 348 | } 349 | }, 350 | "setprototypeof": { 351 | "version": "1.1.1", 352 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 353 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 354 | }, 355 | "statuses": { 356 | "version": "1.5.0", 357 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 358 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 359 | }, 360 | "toidentifier": { 361 | "version": "1.0.0", 362 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 363 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 364 | }, 365 | "type-is": { 366 | "version": "1.6.18", 367 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 368 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 369 | "requires": { 370 | "media-typer": "0.3.0", 371 | "mime-types": "~2.1.24" 372 | } 373 | }, 374 | "unpipe": { 375 | "version": "1.0.0", 376 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 377 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 378 | }, 379 | "utils-merge": { 380 | "version": "1.0.1", 381 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 382 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 383 | }, 384 | "vary": { 385 | "version": "1.1.2", 386 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 387 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 388 | } 389 | } 390 | } 391 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [v25.0.0](https://github.com/amondnet/vercel-action/tree/v25.0.0) (2022-06-08) 4 | 5 | [Full Changelog](https://github.com/amondnet/vercel-action/compare/v20.0.2...v25.0.0) 6 | 7 | ## [v20.0.2](https://github.com/amondnet/vercel-action/tree/v20.0.2) (2022-06-08) 8 | 9 | [Full Changelog](https://github.com/amondnet/vercel-action/compare/v20.0.1...v20.0.2) 10 | 11 | **Closed issues:** 12 | 13 | - Create previews for branches, not per commit [\#150](https://github.com/amondnet/vercel-action/issues/150) 14 | - Error: Resource not accessible by integration [\#148](https://github.com/amondnet/vercel-action/issues/148) 15 | - How to re-authenticate [\#138](https://github.com/amondnet/vercel-action/issues/138) 16 | - Unclear how the build command and the build directory are inferred [\#122](https://github.com/amondnet/vercel-action/issues/122) 17 | 18 | **Merged pull requests:** 19 | 20 | - fix: add quotes around commit message [\#141](https://github.com/amondnet/vercel-action/pull/141) ([Regaddi](https://github.com/Regaddi)) 21 | - docs: how to skip build step [\#136](https://github.com/amondnet/vercel-action/pull/136) ([amondnet](https://github.com/amondnet)) 22 | - docs: use `@vercel/static-build` instead of `@now/static` [\#135](https://github.com/amondnet/vercel-action/pull/135) ([amondnet](https://github.com/amondnet)) 23 | - Revert "docs: remove builds from vercel.json" [\#134](https://github.com/amondnet/vercel-action/pull/134) ([amondnet](https://github.com/amondnet)) 24 | - docs: remove builds from vercel.json [\#133](https://github.com/amondnet/vercel-action/pull/133) ([amondnet](https://github.com/amondnet)) 25 | 26 | ## [v20.0.1](https://github.com/amondnet/vercel-action/tree/v20.0.1) (2022-03-09) 27 | 28 | [Full Changelog](https://github.com/amondnet/vercel-action/compare/v20.0.0...v20.0.1) 29 | 30 | **Implemented enhancements:** 31 | 32 | - Enable users to use "preview-url" in the "github-comment" [\#75](https://github.com/amondnet/vercel-action/issues/75) 33 | - Feature request: enable users to customize github comment [\#52](https://github.com/amondnet/vercel-action/issues/52) 34 | - feat: enable users to customize github comment [\#56](https://github.com/amondnet/vercel-action/pull/56) ([sundoufu](https://github.com/sundoufu)) 35 | 36 | **Closed issues:** 37 | 38 | - Vercel Deployment fails due to "missing input" [\#105](https://github.com/amondnet/vercel-action/issues/105) 39 | - Action doesn't set vercel-org-id [\#96](https://github.com/amondnet/vercel-action/issues/96) 40 | - promote deployment to production if commited branch equals master or main [\#81](https://github.com/amondnet/vercel-action/issues/81) 41 | - Action Failing at vercel inspect [\#80](https://github.com/amondnet/vercel-action/issues/80) 42 | - Use branch name from ref? [\#78](https://github.com/amondnet/vercel-action/issues/78) 43 | - Error when trying to fetch deployment [\#67](https://github.com/amondnet/vercel-action/issues/67) 44 | - Deployment is on the correct branch, but it always use source code on main branch [\#65](https://github.com/amondnet/vercel-action/issues/65) 45 | - Remove depracated package @now/node-server [\#61](https://github.com/amondnet/vercel-action/issues/61) 46 | 47 | **Merged pull requests:** 48 | 49 | - Use vercel-compatible ref naming [\#108](https://github.com/amondnet/vercel-action/pull/108) ([andyrichardson](https://github.com/andyrichardson)) 50 | - reformated checkbox [\#92](https://github.com/amondnet/vercel-action/pull/92) ([claranceliberi](https://github.com/claranceliberi)) 51 | - chore: Fix typo in README.md [\#73](https://github.com/amondnet/vercel-action/pull/73) ([caoer](https://github.com/caoer)) 52 | - ci: pull\_request\_target [\#59](https://github.com/amondnet/vercel-action/pull/59) ([amondnet](https://github.com/amondnet)) 53 | - Parse deployment details in Github comments [\#124](https://github.com/amondnet/vercel-action/pull/124) ([abstractalgo](https://github.com/abstractalgo)) 54 | - feat: Vercel Metadata Override [\#118](https://github.com/amondnet/vercel-action/pull/118) ([cgosiak](https://github.com/cgosiak)) 55 | - ci: use pull request target [\#63](https://github.com/amondnet/vercel-action/pull/63) ([amondnet](https://github.com/amondnet)) 56 | - docs: remove deprecated package now/node-server [\#62](https://github.com/amondnet/vercel-action/pull/62) ([amondnet](https://github.com/amondnet)) 57 | - build\(deps\): bump node-fetch from 2.6.0 to 2.6.1 [\#44](https://github.com/amondnet/vercel-action/pull/44) ([dependabot[bot]](https://github.com/apps/dependabot)) 58 | - build\(deps\): bump lodash from 4.17.15 to 4.17.20 [\#36](https://github.com/amondnet/vercel-action/pull/36) ([dependabot[bot]](https://github.com/apps/dependabot)) 59 | - build\(deps\): bump http-proxy from 1.18.0 to 1.18.1 in /example/angular [\#35](https://github.com/amondnet/vercel-action/pull/35) ([dependabot[bot]](https://github.com/apps/dependabot)) 60 | 61 | ## [v20.0.0](https://github.com/amondnet/vercel-action/tree/v20.0.0) (2020-11-30) 62 | 63 | [Full Changelog](https://github.com/amondnet/vercel-action/compare/v19.0.1+4...v20.0.0) 64 | 65 | **Implemented enhancements:** 66 | 67 | - add support to pull\_request\_target event [\#47](https://github.com/amondnet/vercel-action/pull/47) ([nionis](https://github.com/nionis)) 68 | 69 | **Closed issues:** 70 | 71 | - Error: ENOENT [\#51](https://github.com/amondnet/vercel-action/issues/51) 72 | - Deployment is always done on the same branch refs/heads/develop [\#48](https://github.com/amondnet/vercel-action/issues/48) 73 | 74 | **Merged pull requests:** 75 | 76 | - chore\(README\): Update deployment script path [\#49](https://github.com/amondnet/vercel-action/pull/49) ([richardtapendium](https://github.com/richardtapendium)) 77 | - chore\(deps\): vercel cli v20.1.1 [\#41](https://github.com/amondnet/vercel-action/pull/41) ([amondnet](https://github.com/amondnet)) 78 | 79 | ## [v19.0.1+4](https://github.com/amondnet/vercel-action/tree/v19.0.1+4) (2020-10-13) 80 | 81 | [Full Changelog](https://github.com/amondnet/vercel-action/compare/v19.0.1+3...v19.0.1+4) 82 | 83 | **Fixed bugs:** 84 | 85 | - Getting errors after upgrading to vercel-action [\#4](https://github.com/amondnet/vercel-action/issues/4) 86 | 87 | **Closed issues:** 88 | 89 | - `set-env` command is deprecated and will be disabled soon [\#42](https://github.com/amondnet/vercel-action/issues/42) 90 | - Unable to find version [\#39](https://github.com/amondnet/vercel-action/issues/39) 91 | - Difficulty adding multiple environment variables in vercel-args [\#38](https://github.com/amondnet/vercel-action/issues/38) 92 | - Deployment never finish [\#32](https://github.com/amondnet/vercel-action/issues/32) 93 | - Input required and not supplied: `${name}` [\#26](https://github.com/amondnet/vercel-action/issues/26) 94 | 95 | **Merged pull requests:** 96 | 97 | - fix: deprecating set-env and add-path commands [\#43](https://github.com/amondnet/vercel-action/pull/43) ([amondnet](https://github.com/amondnet)) 98 | - Fix prod\_or\_not in example-static [\#37](https://github.com/amondnet/vercel-action/pull/37) ([olivercoad](https://github.com/olivercoad)) 99 | - feat: improve slugify [\#34](https://github.com/amondnet/vercel-action/pull/34) ([ocavue](https://github.com/ocavue)) 100 | - Update README.md [\#33](https://github.com/amondnet/vercel-action/pull/33) ([zdhz](https://github.com/zdhz)) 101 | 102 | ## [v19.0.1+3](https://github.com/amondnet/vercel-action/tree/v19.0.1+3) (2020-08-12) 103 | 104 | [Full Changelog](https://github.com/amondnet/vercel-action/compare/v19.0.1+2...v19.0.1+3) 105 | 106 | **Fixed bugs:** 107 | 108 | - Deployment succeeds but action log says it failed [\#27](https://github.com/amondnet/vercel-action/issues/27) 109 | - fix: use scope everywhere npx is used [\#24](https://github.com/amondnet/vercel-action/pull/24) ([aulneau](https://github.com/aulneau)) 110 | 111 | **Closed issues:** 112 | 113 | - Deploy is failing [\#28](https://github.com/amondnet/vercel-action/issues/28) 114 | - Not deploying to production [\#22](https://github.com/amondnet/vercel-action/issues/22) 115 | - Alias does not incorporate scope [\#23](https://github.com/amondnet/vercel-action/issues/23) 116 | 117 | **Merged pull requests:** 118 | 119 | - build\(deps\): bump elliptic from 6.5.2 to 6.5.3 in /example/angular [\#25](https://github.com/amondnet/vercel-action/pull/25) ([dependabot[bot]](https://github.com/apps/dependabot)) 120 | - build\(deps\): bump lodash from 4.17.15 to 4.17.19 in /example/angular [\#20](https://github.com/amondnet/vercel-action/pull/20) ([dependabot[bot]](https://github.com/apps/dependabot)) 121 | - Fix latest "inspect" bug by adding manual Vercel Project Name option [\#29](https://github.com/amondnet/vercel-action/pull/29) ([EvanLovely](https://github.com/EvanLovely)) 122 | 123 | ## [v19.0.1+2](https://github.com/amondnet/vercel-action/tree/v19.0.1+2) (2020-07-24) 124 | 125 | [Full Changelog](https://github.com/amondnet/vercel-action/compare/v19.0.1+1...v19.0.1+2) 126 | 127 | **Implemented enhancements:** 128 | 129 | - feat: alias domain to deployment [\#7](https://github.com/amondnet/vercel-action/issues/7) 130 | - feat: alias domain to deployment [\#18](https://github.com/amondnet/vercel-action/pull/18) ([amondnet](https://github.com/amondnet)) 131 | 132 | **Fixed bugs:** 133 | 134 | - Don't send new comment for every pushed commit and just edit existed one [\#15](https://github.com/amondnet/vercel-action/issues/15) 135 | 136 | **Closed issues:** 137 | 138 | - There was an error when attempting to execute the process [\#16](https://github.com/amondnet/vercel-action/issues/16) 139 | - Custom env in action [\#13](https://github.com/amondnet/vercel-action/issues/13) 140 | - Action fails even when build succeeds [\#11](https://github.com/amondnet/vercel-action/issues/11) 141 | - Failed to find deployment \(url\) in \(user\) [\#10](https://github.com/amondnet/vercel-action/issues/10) 142 | - Error! Project not found [\#9](https://github.com/amondnet/vercel-action/issues/9) 143 | - New release [\#19](https://github.com/amondnet/vercel-action/issues/19) 144 | 145 | **Merged pull requests:** 146 | 147 | - build\(deps\): bump @actions/http-client from 1.0.6 to 1.0.8 [\#6](https://github.com/amondnet/vercel-action/pull/6) ([dependabot[bot]](https://github.com/apps/dependabot)) 148 | - fix: don't send new comment for every pushed commit and just edit exi… [\#17](https://github.com/amondnet/vercel-action/pull/17) ([amondnet](https://github.com/amondnet)) 149 | - chore: fix broken workflow\(s\) link [\#14](https://github.com/amondnet/vercel-action/pull/14) ([shunkakinoki](https://github.com/shunkakinoki)) 150 | - build\(deps\): bump websocket-extensions from 0.1.3 to 0.1.4 in /example/angular [\#12](https://github.com/amondnet/vercel-action/pull/12) ([dependabot[bot]](https://github.com/apps/dependabot)) 151 | 152 | ## [v19.0.1+1](https://github.com/amondnet/vercel-action/tree/v19.0.1+1) (2020-05-18) 153 | 154 | [Full Changelog](https://github.com/amondnet/vercel-action/compare/v19.0.1...v19.0.1+1) 155 | 156 | **Fixed bugs:** 157 | 158 | - fix: vercel inspect fails in team scope [\#5](https://github.com/amondnet/vercel-action/pull/5) ([amondnet](https://github.com/amondnet)) 159 | 160 | ## [v19.0.1](https://github.com/amondnet/vercel-action/tree/v19.0.1) (2020-05-18) 161 | 162 | [Full Changelog](https://github.com/amondnet/vercel-action/compare/v2.0.3...v19.0.1) 163 | 164 | **Fixed bugs:** 165 | 166 | - Remove double https:// [\#3](https://github.com/amondnet/vercel-action/pull/3) ([sunderipranata](https://github.com/sunderipranata)) 167 | 168 | **Merged pull requests:** 169 | 170 | - refactor: eslint [\#2](https://github.com/amondnet/vercel-action/pull/2) ([amondnet](https://github.com/amondnet)) 171 | - feat: rename to vercel [\#1](https://github.com/amondnet/vercel-action/pull/1) ([amondnet](https://github.com/amondnet)) 172 | 173 | 174 | --- 175 | 176 | # ZEIT Now Deplyoment Changelog 177 | 178 | ## [v2.0.3](https://github.com/amondnet/now-deployment/tree/v2.0.3) (2020-05-06) 179 | 180 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v2.0.2...v2.0.3) 181 | 182 | **Implemented enhancements:** 183 | 184 | - Show project name in Github comment [\#44](https://github.com/amondnet/now-deployment/pull/44) ([rodrigorm](https://github.com/rodrigorm)) 185 | 186 | **Closed issues:** 187 | 188 | - Update now version to v18 [\#41](https://github.com/amondnet/now-deployment/issues/41) 189 | 190 | **Merged pull requests:** 191 | 192 | - docs: basic auth example [\#46](https://github.com/amondnet/now-deployment/pull/46) ([amondnet](https://github.com/amondnet)) 193 | - build: now@18.0.0 [\#45](https://github.com/amondnet/now-deployment/pull/45) ([amondnet](https://github.com/amondnet)) 194 | 195 | ## [v2.0.2](https://github.com/amondnet/now-deployment/tree/v2.0.2) (2020-04-04) 196 | 197 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v2.0.1...v2.0.2) 198 | 199 | **Implemented enhancements:** 200 | 201 | - team\_id seems to be not working [\#19](https://github.com/amondnet/now-deployment/issues/19) 202 | 203 | **Fixed bugs:** 204 | 205 | - undefined url on pull request comment [\#37](https://github.com/amondnet/now-deployment/issues/37) 206 | - Branch is undefined [\#31](https://github.com/amondnet/now-deployment/issues/31) 207 | - Outputs object is always empty [\#25](https://github.com/amondnet/now-deployment/issues/25) 208 | - Fix empty output object [\#38](https://github.com/amondnet/now-deployment/pull/38) ([hakonkrogh](https://github.com/hakonkrogh)) 209 | - fix: branch is undefined [\#33](https://github.com/amondnet/now-deployment/pull/33) ([amondnet](https://github.com/amondnet)) 210 | 211 | **Closed issues:** 212 | 213 | - Validation failed: commit\_id has been locked when deploying multiple projects [\#21](https://github.com/amondnet/now-deployment/issues/21) 214 | 215 | **Merged pull requests:** 216 | 217 | - chore\(release\): 2.0.2 [\#39](https://github.com/amondnet/now-deployment/pull/39) ([amondnet](https://github.com/amondnet)) 218 | - docs\(README\): Update documentation regarding github secrets [\#35](https://github.com/amondnet/now-deployment/pull/35) ([amalv](https://github.com/amalv)) 219 | 220 | ## [v2.0.1](https://github.com/amondnet/now-deployment/tree/v2.0.1) (2020-02-25) 221 | 222 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v2.0.0...v2.0.1) 223 | 224 | **Fixed bugs:** 225 | 226 | - fix: outputs object is always empty [\#29](https://github.com/amondnet/now-deployment/pull/29) ([amondnet](https://github.com/amondnet)) 227 | 228 | **Closed issues:** 229 | 230 | - How can I deploy with an assigned domain? [\#30](https://github.com/amondnet/now-deployment/issues/30) 231 | - Add instruction on getting `project\_id` and `org\_id` [\#27](https://github.com/amondnet/now-deployment/issues/27) 232 | 233 | **Merged pull requests:** 234 | 235 | - docs: how to get organization and project id of project [\#28](https://github.com/amondnet/now-deployment/pull/28) ([amondnet](https://github.com/amondnet)) 236 | 237 | ## [v2.0.0](https://github.com/amondnet/now-deployment/tree/v2.0.0) (2020-02-18) 238 | 239 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v1.2.0...v2.0.0) 240 | 241 | **Implemented enhancements:** 242 | 243 | - Do not want to receive comments from action [\#14](https://github.com/amondnet/now-deployment/issues/14) 244 | - Support for Vercel CLI v17 [\#24](https://github.com/amondnet/now-deployment/issues/24) 245 | - feat: now cli v17, add `NOW\_PROJECT\_ID` and `NOW\_ORG\_ID` env variable [\#26](https://github.com/amondnet/now-deployment/pull/26) ([amondnet](https://github.com/amondnet)) 246 | 247 | **Fixed bugs:** 248 | 249 | - Deploy stalled [\#23](https://github.com/amondnet/now-deployment/issues/23) 250 | 251 | **Closed issues:** 252 | 253 | - Can I upload the contents of a folder with pre-built assets? [\#22](https://github.com/amondnet/now-deployment/issues/22) 254 | - getting 403 error every time it tries to comment [\#18](https://github.com/amondnet/now-deployment/issues/18) 255 | - Feature: Ability to specify path for --local-config flag [\#16](https://github.com/amondnet/now-deployment/issues/16) 256 | 257 | ## [v1.2.0](https://github.com/amondnet/now-deployment/tree/v1.2.0) (2020-01-28) 258 | 259 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v1...v1.2.0) 260 | 261 | **Implemented enhancements:** 262 | 263 | - feat: github comment optional [\#20](https://github.com/amondnet/now-deployment/pull/20) ([amondnet](https://github.com/amondnet)) 264 | 265 | ## [v1.1.0](https://github.com/amondnet/now-deployment/tree/v1.1.0) (2020-01-17) 266 | 267 | [Full Changelog](https://github.com/amondnet/now-deployment/compare/v1.0.1...v1.1.0) 268 | 269 | **Implemented enhancements:** 270 | 271 | - feature: add working dir input [\#17](https://github.com/amondnet/now-deployment/pull/17) ([foxundermoon](https://github.com/foxundermoon)) 272 | 273 | **Fixed bugs:** 274 | 275 | - Built with commit undefined [\#9](https://github.com/amondnet/now-deployment/issues/9) 276 | - Add prod args have an error invalidTagName [\#6](https://github.com/amondnet/now-deployment/issues/6) 277 | - fix: built with commit undefined [\#10](https://github.com/amondnet/now-deployment/pull/10) ([amondnet](https://github.com/amondnet)) 278 | - fix now-args bug [\#8](https://github.com/amondnet/now-deployment/pull/8) ([foxundermoon](https://github.com/foxundermoon)) 279 | - Update action.yml [\#7](https://github.com/amondnet/now-deployment/pull/7) ([foxundermoon](https://github.com/foxundermoon)) 280 | - fix: commit author [\#4](https://github.com/amondnet/now-deployment/pull/4) ([amondnet](https://github.com/amondnet)) 281 | - fix: typo in argument [\#3](https://github.com/amondnet/now-deployment/pull/3) ([amalv](https://github.com/amalv)) 282 | 283 | **Closed issues:** 284 | 285 | - Can't unlink a previous Org connection if I no longer have access to org [\#15](https://github.com/amondnet/now-deployment/issues/15) 286 | - How to deploy from other folders such as build [\#13](https://github.com/amondnet/now-deployment/issues/13) 287 | - Deployment succeeds but workflow reports failure [\#12](https://github.com/amondnet/now-deployment/issues/12) 288 | 289 | **Merged pull requests:** 290 | 291 | - release: v1 [\#1](https://github.com/amondnet/now-deployment/pull/1) ([amondnet](https://github.com/amondnet)) 292 | 293 | 294 | 295 | \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* 296 | --------------------------------------------------------------------------------