Skip to content

Commit

Permalink
Merge branch 'dev' into releases/v3
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Oct 17, 2020
2 parents e80c869 + fa5589d commit e45a9df
Show file tree
Hide file tree
Showing 18 changed files with 890 additions and 1,111 deletions.
21 changes: 13 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/es6"],
"plugins": ["jest", "@typescript-eslint", "github"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
Expand All @@ -19,13 +19,17 @@
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/camelcase": "error",
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase", "UPPER_CASE", "StrictPascalCase"]
}
],
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
Expand All @@ -50,11 +54,12 @@
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error",
"no-console": "off"
"no-console": "off",
"no-shadow": ["error", { "builtinGlobals": false, "hoist": "all", "allow": ["Status"] }]
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
}
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [JamesIves]
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels:

---

<!-- Please check the FAQ before posting an issue: https://github.com/JamesIves/github-pages-deploy-action/wiki -->
<!-- Please check the Q&A before posting an issue: https://github.com/JamesIves/github-pages-deploy-action/discussions?discussions_q=category%3AQ%26A -->

**Describe the bug**
<!-- Please provide a clear and concise description of what the bug is. -->
Expand Down
18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/SUPPORT.md

This file was deleted.

10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request and Ideas
url: https://github.com/JamesIves/github-pages-deploy-action/discussions?discussions_q=category%3AIdeas
about: If you have an idea or would like to make a feature request please open a discussion thread.

- name: Support and Questions
url: https://github.com/JamesIves/github-pages-deploy-action/discussions?discussions_q=category%3AQ%26A
about: Need help or just have a general question? Please open a discussion thread.

8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.19.0
v12.18.4
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing ✏️

When contributing to this repository, please first discuss the change you wish to make via issue,
[email, or any other method with the owners of this repository](https://jamesiv.es) before making a change.
[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!

## Before Making a Pull Request 🎒

Expand Down
48 changes: 28 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
<img src="https://github.com/JamesIves/github-pages-deploy-action/workflows/integration-tests/badge.svg">
</a>

<a href="https://github.com/marketplace/actions/deploy-to-github-pages">
<img src="https://img.shields.io/badge/action-marketplace-blue.svg?logo=github&color=orange">
<a href="https://codecov.io/gh/JamesIves/github-pages-deploy-action/branch/dev">
<img src="https://codecov.io/gh/JamesIves/github-pages-deploy-action/branch/dev/graph/badge.svg">
</a>

<a href="https://github.com/JamesIves/github-pages-deploy-action/releases">
<img src="https://img.shields.io/github/v/release/JamesIves/github-pages-deploy-action.svg?logo=github">
</a>

<a href="https://codecov.io/gh/JamesIves/github-pages-deploy-action/branch/dev">
<img src="https://codecov.io/gh/JamesIves/github-pages-deploy-action/branch/dev/graph/badge.svg">
<a href="https://github.com/marketplace/actions/deploy-to-github-pages">
<img src="https://img.shields.io/badge/action-marketplace-blue.svg?logo=github&color=orange">
</a>
</p>

Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
npm run build
- name: Deploy 🚀
uses: JamesIves/[email protected].1
uses: JamesIves/[email protected].2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
Expand All @@ -83,21 +83,20 @@ It's recommended that you use [Dependabot](https://dependabot.com/github-actions

#### Install as a Node Module 📦

If you'd like to use the functionality provided by this action in your own action you can install it using [yarn](https://yarnpkg.com/) by running the following command.
If you'd like to use the functionality provided by this action in your own action you can install it using [yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/get-npm) by running the following commands. It's available on both the [npm](https://www.npmjs.com/package/@jamesives/github-pages-deploy-action) and [GitHub registry](https://github.com/JamesIves/github-pages-deploy-action/packages/229985).

```
yarn add @jamesives/github-pages-deploy-action
```
```
npm install @jamesives/github-pages-deploy-action
```
It can then be imported into your project like so.
```javascript
import run, {
init,
deploy,
generateBranch,
ActionInterface
} from "github-pages-deploy-action";
import run from "github-pages-deploy-action";
```

Calling the functions directly will require you to pass in an object containing the variables found in the configuration section, you'll also need to provide a `workspace` with a path to your project.
Expand All @@ -110,11 +109,12 @@ run({
branch: "gh-pages",
folder: "build",
repositoryName: "JamesIves/github-pages-deploy-action",
silent: true,
workspace: "src/project/location",
});
```

For more information regarding the [action interface please click here](https://github.com/JamesIves/github-pages-deploy-action/blob/dev/src/constants.ts#L7). You can find the npm registry listing for the module [here](https://www.npmjs.com/package/@jamesives/github-pages-deploy-action), and the GitHub registry listing [here](https://github.com/JamesIves/github-pages-deploy-action/packages/229985).
For more information regarding the [action interface please click here](https://github.com/JamesIves/github-pages-deploy-action/blob/dev/src/constants.ts#L7).

## Configuration 📁

Expand All @@ -135,7 +135,7 @@ In addition to the deployment options you must also configure the following.
| Key | Value Information | Type | Required |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- |
| `BRANCH` | This is the branch you wish to deploy to, for example `gh-pages` or `docs`. | `with` | **Yes** |
| `FOLDER` | The folder in your repository that you want to deploy. If your build script compiles into a directory named `build` you'd put it here. **Folder paths cannot have a leading `/` or `./`**. If you wish to deploy the root directory you can place a `.` here. | `with` | **Yes** |
| `FOLDER` | The folder in your repository that you want to deploy. If your build script compiles into a directory named `build` you'd put it here. If you wish to deploy the root directory you can place a `.` here. You can also utilize absolute file paths by appending `~` to your folder path. | `with` | **Yes** |

#### Optional Choices

Expand Down Expand Up @@ -174,7 +174,7 @@ The action will export an environment variable called `DEPLOYMENT_STATUS` that y
If you'd prefer to use an SSH deploy key as opposed to a token you must first generate a new SSH key by running the following terminal command, replacing the email with one connected to your GitHub account.

```bash
ssh-keygen -t rsa -b 4096 -C "[email protected]" -N ""
ssh-keygen -t rsa -m pem -b 4096 -C "[email protected]" -N ""
```

Once you've generated the key pair you must add the contents of the public key within your repository's [deploy keys menu](https://developer.github.com/v3/guides/managing-deploy-keys/). You can find this option by going to `Settings > Deploy Keys`, you can name the public key whatever you want, but you **do** need to give it write access. Afterwards add the contents of the private key to the `Settings > Secrets` menu as `DEPLOY_KEY`.
Expand All @@ -183,12 +183,12 @@ With this configured you must add the `ssh-agent` step to your workflow and set

```yml
- name: Install SSH Client 🔑
uses: webfactory/ssh-agent@v0.2.0
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Deploy 🚀
uses: JamesIves/[email protected].1
uses: JamesIves/[email protected].2
with:
SSH: true
BRANCH: gh-pages
Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Deploy 🚀
uses: JamesIves/[email protected].1
uses: JamesIves/[email protected].2
with:
BASE_BRANCH: master
BRANCH: gh-pages
Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:
name: site
- name: Deploy 🚀
uses: JamesIves/[email protected].1
uses: JamesIves/[email protected].2
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
Expand All @@ -313,7 +313,7 @@ If you use a [container](https://help.github.com/en/actions/automating-your-work
apt-get update && apt-get install -y rsync
- name: Deploy 🚀
uses: JamesIves/[email protected].1
uses: JamesIves/[email protected].2
```

---
Expand All @@ -329,3 +329,11 @@ If you wish to remove these files you must go into the deployment branch directl
### Debugging 🐝

If you'd like to enable action debugging you can set the `ACTIONS_STEP_DEBUG` environment variable to true within the [Settings/Secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets) menu. If you're using this action in your own project as a node module via yarn or npm **you may expose your secrets if you toggle this on in a production environment**. You can learn more about debugging GitHub actions [here](https://github.com/actions/toolkit/blob/master/docs/action-debugging.md).

---

## Support 💖

This project would not be possible without all of our fantastic [contributors](https://github.com/JamesIves/github-pages-deploy-action/graphs/contributors).

If you'd like to support the maintenance and upkeep of this project you can [donate via GitHub Sponsors](https://github.com/sponsors/JamesIves). This project is distributed under the [MIT](https://github.com/JamesIves/github-pages-deploy-action/blob/dev/LICENSE) license.
Loading

0 comments on commit e45a9df

Please sign in to comment.