github-pages-deploy-action/CONTRIBUTING.md

55 lines
2.5 KiB
Markdown
Raw Permalink Normal View History

2020-05-17 01:37:08 +08:00
# Contributing ✏️
2019-09-25 09:10:32 +08:00
When contributing to this repository, please first discuss the change you wish to make via issue,
2020-10-01 23:34:44 +08:00
[email, or any other method with the owners of this repository](https://jamesiv.es) before making a change. If you are planning to work on an issue that already exists please let us know before writing any code incase it's already in flight!
2019-09-25 09:10:32 +08:00
2020-05-17 01:37:08 +08:00
## Before Making a Pull Request 🎒
2019-09-25 09:10:32 +08:00
2020-05-17 01:37:08 +08:00
1. Ensure that you've tested your feature/change yourself. As the primary focus of this project is deployment, providing a link to a deployed repository using your branch is preferred. You can reference the forked action using your GitHub username, for example `yourname/github-pages-deplpy-action@master`.
2. Ensure your change passes all of the integration tests.
3. Make sure you update the README if you've made a change that requires documentation.
4. When making a pull request, highlight any areas that may cause a breaking change so the maintainer can update the version number accordingly on the GitHub marketplace and package registries.
5. Make sure you've formatted and linted your code. You can do this by running `yarn format` and `yarn lint`.
6. Fix or add any tests where applicable. You can run `yarn test` to run the suite. As this action is small in scope it's important that a high level of test coverage is maintained. All tests are written using [Jest](https://jestjs.io/).
7. As this package is written in [TypeScript](https://www.typescriptlang.org/) please ensure all typing is accurate and the action compiles correctly by running `yarn build`.
2020-05-17 01:37:08 +08:00
## Deploying 🚚
In order to deploy and test your own fork of this action, you must commit the `node_modules` dependencies. Be sure to run `nvm use` before installing any dependencies. You can learn more about nvm [here](https://github.com/nvm-sh/nvm/blob/master/README.md).
To do this you can follow the instructions below:
2020-03-31 20:48:19 +08:00
Install the project:
```
yarn install
```
Comment out the following in distribution branches:
```
# node_modules/
2020-05-17 21:07:22 +08:00
# lib/
```
2020-03-31 20:48:19 +08:00
Build the project:
```
yarn build
```
Commit:
```
$ git checkout -b branchnamehere
$ git commit -a -m "prod dependencies"
```
2020-05-17 21:15:51 +08:00
The `node_modules` and `lib` folders should _not_ be included when making a pull request. These are only required for GitHub Actions when it consumes the distribution branch, the `dev` branch of the project should be free from any dependencies or lib files.
2020-05-17 01:39:52 +08:00
## Resources 💡
* [TypeScript](https://www.typescriptlang.org/)
* [Jest](https://jestjs.io/)
* [GitHub Actions Documentation](https://help.github.com/en/actions)