Skip to content

Commit cff00e0

Browse files
tinesoftAgentEnder
andauthored
feat(nx-ghpages): add option to customize commit message to gh-pages (#542)
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
1 parent 374e30f commit cff00e0

File tree

6 files changed

+14
-1
lines changed

6 files changed

+14
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
# NxDotnet
66

77
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
8+
89
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)
10+
911
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1012

1113
[![Join the chat at https://gitter.im/nx-dotnet-plugin/community](https://badges.gitter.im/nx-dotnet-plugin/community.svg)](https://gitter.im/nx-dotnet-plugin/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Run CI checks](https://github.com/nx-dotnet/nx-dotnet/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/nx-dotnet/nx-dotnet/actions/workflows/main.yml)

docs/nx-ghpages/executors/deploy.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ Deploy a page to a specified repository&#39;s gh-pages branch.
1717
### remoteName
1818

1919
- (string): Name of the remote to push to
20+
21+
### commitMessage
22+
23+
- (string): Message of the git commit to gh-pages branch

packages/nx-ghpages/src/executors/deploy/executor.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const options: BuildExecutorSchema = {
2121
directory: '',
2222
remote: '',
2323
remoteName: '',
24+
commitMessage: '',
2425
};
2526

2627
describe('Build Executor', () => {

packages/nx-ghpages/src/executors/deploy/executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default async function deployExecutor(options: BuildExecutorSchema) {
4848
logger.info('Authoring Commit');
4949

5050
await exec(`git add .`, { cwd: directory });
51-
await exec(` git commit -m "deploy to gh-pages (nx-ghpages)"`, {
51+
await exec(` git commit -m "${options.commitMessage}"`, {
5252
cwd: directory,
5353
});
5454

packages/nx-ghpages/src/executors/deploy/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export interface BuildExecutorSchema {
22
remote: string;
33
directory: string;
44
remoteName: string;
5+
commitMessage: string;
56
}

packages/nx-ghpages/src/executors/deploy/schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
"type": "string",
1818
"description": "Name of the remote to push to",
1919
"default": "origin"
20+
},
21+
"commitMessage": {
22+
"type": "string",
23+
"description": "Message of the git commit to gh-pages branch",
24+
"default": "chore: :rocket: deploy new version to Github Pages"
2025
}
2126
},
2227
"required": ["remote", "directory"]

0 commit comments

Comments
 (0)