Skip to content

Commit de9f21a

Browse files
authored
docs: Improve documentation
1 parent 07bd3b7 commit de9f21a

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

README.md

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -89,52 +89,13 @@ on:
8989
- main
9090
```
9191

92-
It's recommended that you use [Dependabot](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically) to keep your workflow up-to-date and [secure](https://github.com/features/security). You can find the latest tagged version on the [GitHub Marketplace](https://github.com/marketplace/actions/deploy-to-github-pages) or on the [releases page](https://github.com/JamesIves/github-pages-deploy-action/releases).
93-
94-
#### Permission Settings ⚠️
95-
92+
> **Warning**
9693
If you do not supply the action with an access token or an SSH key, you must access your repositories settings and provide `Read and Write Permissions` to the provided `GITHUB_TOKEN`, otherwise you'll potentailly run into permission issues. Alternatively you can set the following in your workflow file to grant the action the permissions it needs.
97-
9894
```yml
9995
permissions:
10096
contents: write
10197
```
10298

103-
#### Install as a Node Module 📦
104-
105-
If you'd like to use the functionality provided by this action in your own action you can either [create a composite action](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action), or 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).
106-
107-
```
108-
yarn add @jamesives/github-pages-deploy-action
109-
```
110-
111-
```
112-
npm install @jamesives/github-pages-deploy-action
113-
```
114-
115-
It can then be imported into your project like so.
116-
117-
```javascript
118-
import run from '@jamesives/github-pages-deploy-action'
119-
```
120-
121-
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.
122-
123-
```javascript
124-
import run from '@jamesives/github-pages-deploy-action'
125-
126-
run({
127-
token: process.env['ACCESS_TOKEN'],
128-
folder: 'build',
129-
repositoryName: 'JamesIves/github-pages-deploy-action',
130-
silent: true,
131-
workspace: 'src/project/location',
132-
tag: 'v0.1'
133-
})
134-
```
135-
136-
For more information regarding the [action interface please click here](https://github.com/JamesIves/github-pages-deploy-action/blob/dev/src/constants.ts#L7).
137-
13899
## Configuration 📁
139100

140101
The `with` portion of the workflow **must** be configured before the action will work. You can add these in the `with` section found in the examples above. Any `secrets` must be referenced using the bracket syntax and stored in the GitHub repository's `Settings/Secrets` menu. You can learn more about setting environment variables with GitHub actions [here](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets).

0 commit comments

Comments
 (0)