From 88ce8e31ca1074be1f63f5355f0374f1ea2245fb Mon Sep 17 00:00:00 2001 From: Rodrigo Fernandes Date: Wed, 1 Jan 2020 20:04:54 +0000 Subject: [PATCH 1/2] doc: Fix readme highlight --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0985cdb..6aac35f 100644 --- a/README.md +++ b/README.md @@ -92,11 +92,15 @@ You can also refer to it from a CDN like [CDNJS](https://cdnjs.com/libraries/dif > JSON representation of the diff - function parse(diffInput: string, configuration: Diff2HtmlConfig = {}): DiffFile[] +```ts +function parse(diffInput: string, configuration: Diff2HtmlConfig = {}): DiffFile[]; +``` > Pretty HTML representation of the diff - function html(diffInput: string | DiffFile[], configuration: Diff2HtmlConfig = {}): string +```ts +function html(diffInput: string | DiffFile[], configuration: Diff2HtmlConfig = {}): string; +``` > Check out the [docs/demo.html](./docs/demo.html) for a demo example. From a04aa652d99e2b58788869cd0e414a883adea802 Mon Sep 17 00:00:00 2001 From: Rodrigo Fernandes Date: Wed, 1 Jan 2020 20:08:20 +0000 Subject: [PATCH 2/2] feature: Allow to skip ci using commit message --- .github/workflows/ci.yml | 1 + .github/workflows/release.yml | 6 ++++-- .github/workflows/website.yml | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50b99ca..e1950e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: [push] jobs: build: + if: "!contains(github.event.head_commit.message, 'skip ci')" runs-on: ubuntu-18.04 env: CI: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b94b1b..84c3371 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,12 +8,14 @@ on: jobs: version: + if: + github.event.pull_request.merged && "!contains(github.event.head_commit.message, 'skip ci')" && + "!contains(github.event.head_commit.message, 'skip release')" runs-on: ubuntu-18.04 container: image: codacy/git-version steps: - uses: actions/checkout@v1 - if: github.event.pull_request.merged - name: Configure Git run: | git checkout -f "${GITHUB_REF#refs/heads/}" @@ -107,7 +109,7 @@ jobs: with: node-version: 13 registry-url: https://npm.pkg.github.com - scope: "@rtfpessoa" + scope: '@rtfpessoa' - name: Publish to GitHub env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index f2f8c35..f2e69a2 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -8,6 +8,9 @@ on: jobs: build: + if: + github.event.pull_request.merged && "!contains(github.event.head_commit.message, 'skip ci')" && + "!contains(github.event.head_commit.message, 'skip release')" runs-on: ubuntu-18.04 env: CI: true @@ -16,7 +19,6 @@ jobs: node-version: [13.x] steps: - uses: actions/checkout@v1 - if: github.event.pull_request.merged - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: