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
Copy file name to clipboardexpand all lines: README.md
+5-11
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ You can view an example of this below.
59
59
```yml
60
60
name: Build and Deploy
61
61
on: [push]
62
-
permissions:
62
+
permissions:
63
63
contents: write
64
64
jobs:
65
65
build-and-deploy:
@@ -77,7 +77,6 @@ jobs:
77
77
- name: Deploy 🚀
78
78
uses: JamesIves/github-pages-deploy-action@v4.3.3
79
79
with:
80
-
branch: gh-pages # The branch the action should deploy to.
81
80
folder: build # The folder the action should deploy.
82
81
```
83
82
@@ -97,7 +96,7 @@ It's recommended that you use [Dependabot](https://docs.github.com/en/code-secur
97
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.
98
97
99
98
```yml
100
-
permissions:
99
+
permissions:
101
100
contents: write
102
101
```
103
102
@@ -126,7 +125,6 @@ import run from '@jamesives/github-pages-deploy-action'
|`branch`| This is the branch you wish to deploy to, for example, `gh-pages` or `docs`. |`with`|**Yes**|
150
147
|`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**|
151
148
152
149
By default, the action does not need any token configuration and uses the provided repository scoped GitHub token to make the deployment. If you require more customization you can modify the deployment type using the following options.
@@ -160,6 +157,7 @@ By default, the action does not need any token configuration and uses the provid
|`branch`| This is the branch you wish to deploy to, for example, `gh-pages` or `docs`. |`with`|**No**|
163
161
|`git-config-name`| Allows you to customize the name that is attached to the git config which is used when pushing the deployment commits. If this is not included it will use the name in the GitHub context, followed by the name of the action. |`with`|**No**|
164
162
|`git-config-email`| Allows you to customize the email that is attached to the git config which is used when pushing the deployment commits. If this is not included it will use the email in the GitHub context, followed by a generic noreply GitHub email. You can include `<>` for the value if you wish to omit this field altogether and push the commits without an email. |`with`|**No**|
165
163
|`repository-name`| 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`. You'll need to use a PAT in the `token` input for this configuration option to work properly. |`with`|**No**|
@@ -205,7 +203,6 @@ With this configured, you can then set the `ssh-key` part of the action to your
205
203
- name: Deploy 🚀
206
204
uses: JamesIves/github-pages-deploy-action@v4.3.3
207
205
with:
208
-
branch: gh-pages
209
206
folder: site
210
207
ssh-key: ${{ secrets.DEPLOY_KEY }}
211
208
```
@@ -235,7 +232,6 @@ jobs:
235
232
- name: Deploy 🚀
236
233
uses: JamesIves/github-pages-deploy-action@v4.3.3
237
234
with:
238
-
branch: gh-pages
239
235
folder: build
240
236
clean: true
241
237
clean-exclude: |
@@ -269,7 +265,7 @@ If you're using an operating system such as [Windows](https://www.microsoft.com/
269
265
```yml
270
266
name: Build and Deploy
271
267
on: [push]
272
-
permissions:
268
+
permissions:
273
269
contents: write
274
270
jobs:
275
271
build:
@@ -305,7 +301,6 @@ jobs:
305
301
- name: Deploy 🚀
306
302
uses: JamesIves/github-pages-deploy-action@v4.3.3
307
303
with:
308
-
branch: gh-pages
309
304
folder: 'site' # The deployment folder should match the name of the artifact. Even though our project builds into the 'build' folder the artifact name of 'site' must be placed here.
310
305
```
311
306
@@ -338,7 +333,7 @@ If you're using a custom domain and require a `CNAME` file, or if you require th
Copy file name to clipboardexpand all lines: action.yml
+2-1
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,8 @@ inputs:
33
33
34
34
branch:
35
35
description: 'This is the branch you wish to deploy to, for example gh-pages or docs.'
36
-
required: true
36
+
required: false
37
+
default: gh-pages
37
38
38
39
folder:
39
40
description: 'The folder in your repository that you want to deploy. If your build script compiles into a directory named build you would put it here. Folder paths cannot have a leading / or ./. If you wish to deploy the root directory you can place a . here.'
0 commit comments