You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
-
96
-
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.
92
+
> **Warning**
93
+
> 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 potentially run into permission issues. Alternatively you can set the following in your workflow file to grant the action the permissions it needs.
97
94
98
95
```yml
99
96
permissions:
100
97
contents: write
101
98
```
102
99
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.
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
-
138
100
## Configuration 📁
139
101
140
102
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).
@@ -170,7 +132,6 @@ By default, the action does not need any token configuration and uses the provid
170
132
| `single-commit` | This option can be toggled to `true` if you'd prefer to have a single commit on the deployment branch instead of maintaining the full history. **Using this option will also cause any existing history to be wiped from the deployment branch**. | `with` | **No** |
171
133
| `force` | Force-push new deployments to overwrite the previous version; otherwise, attempt to rebase new deployments onto any existing ones. This option is turned on by default and can be toggled off by setting it to `false`, which may be useful if there are multiple deployments in a single branch. | `with` | **No** |
172
134
| `silent` | Silences the action output preventing it from displaying git messages. | `with` | **No** |
173
-
|`workspace`| This should point to where your project lives on the virtual machine. The GitHub Actions environment will set this for you. It is only necessary to set this variable if you're using the node module. |`with`|**No**|
174
135
| `tag` | Add a tag to the commit. Only works when `dry-run` is not used. | `with` | **No** |
175
136
176
137
With the action correctly configured you should see the workflow trigger the deployment under the configured conditions.
Copy file name to clipboardExpand all lines: action.yml
+3-7Lines changed: 3 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ name: 'Deploy to GitHub Pages'
2
2
description: 'This action will handle the deployment process of your project to GitHub Pages.'
3
3
author: 'James Ives <iam@jamesiv.es>'
4
4
runs:
5
-
using: 'node12'
5
+
using: 'node16'
6
6
main: 'lib/main.js'
7
7
branding:
8
8
icon: 'git-commit'
@@ -24,7 +24,7 @@ inputs:
24
24
However if you need more permissions for things such as deploying to another repository, you can add a Personal Access Token (PAT) here.
25
25
This should be stored in the `secrets / with` menu **as a secret**.
26
26
27
-
We recommend using a service account with the least permissions neccersary
27
+
We recommend using a service account with the least permissions necessary
28
28
and when generating a new PAT that you select the least permission scopes required.
29
29
30
30
[Learn more about creating and using encrypted secrets here.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
@@ -58,7 +58,7 @@ inputs:
58
58
required: false
59
59
60
60
dry-run:
61
-
description: 'Do not actually push back, but use `--dry-run` on `git push` invocations insead.'
61
+
description: 'Do not actually push back, but use `--dry-run` on `git push` invocations instead.'
62
62
required: false
63
63
64
64
force:
@@ -78,10 +78,6 @@ inputs:
78
78
description: 'Allows you to specify a different repository path so long as you have permissions to push to it. This should be formatted like so: JamesIves/github-pages-deploy-action'
79
79
required: false
80
80
81
-
workspace:
82
-
description: "This should point to where your project lives on the virtual machine. The GitHub Actions environment will set this for you. It is only neccersary to set this variable if you're using the node module."
83
-
required: false
84
-
85
81
tag:
86
82
description: "Add a tag to the commit, this can be used like so: 'v0.1'. Only works when 'dry-run' is not used."
0 commit comments