mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Root Directory
This commit is contained in:
parent
958af6dcf5
commit
cb8475c270
10
README.md
10
README.md
@ -37,13 +37,13 @@ The `secrets` and `env` portion of the workflow **must** be configured before th
|
|||||||
| Key | Value Information | Type | Required |
|
| Key | Value Information | Type | Required |
|
||||||
| ------------- | ------------- | ------------- | ------------- |
|
| ------------- | ------------- | ------------- | ------------- |
|
||||||
| `ACCESS_TOKEN` | In order for GitHub to trigger the rebuild of your page you must provide the action with a GitHub personal access token. You can [learn more about how to generate one here](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line). This **should be stored as a secret.** | `secrets` | **Yes** |
|
| `ACCESS_TOKEN` | In order for GitHub to trigger the rebuild of your page you must provide the action with a GitHub personal access token. You can [learn more about how to generate one here](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line). This **should be stored as a secret.** | `secrets` | **Yes** |
|
||||||
| `BUILD_SCRIPT` | If you require a build script to compile your code prior to pushing it you can add the script here. The Docker container which powers the action runs Node which means `npm` commands are valid. If you're using a static site generator such as Jekyll I'd suggest compiling the code prior to pushing it to your base branch. | `env` | **No** |
|
|
||||||
| `BRANCH` | This is the branch you wish to deploy to, for example `gh-pages` or `docs`. | `env` | **Yes** |
|
| `BRANCH` | This is the branch you wish to deploy to, for example `gh-pages` or `docs`. | `env` | **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. You can instruct the action to deploy from the root directory by placing `/` in this field. | `env` | **Yes** |
|
||||||
| `BASE_BRANCH` | The base branch of your repository which you'd like to checkout prior to deploying. This defaults to `master`. | `env` | **No** |
|
| `BASE_BRANCH` | The base branch of your repository which you'd like to checkout prior to deploying. This defaults to `master`. | `env` | **No** |
|
||||||
| `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. | `env` | **Yes** |
|
| `BUILD_SCRIPT` | If you require a build script to compile your code prior to pushing it you can add the script here. The Docker container which powers the action runs Node which means `npm` commands are valid. If you're using a static site generator such as Jekyll I'd suggest compiling the code prior to pushing it to your base branch. | `env` | **No** |
|
||||||
| `COMMIT_NAME` | Used to sign the commit, this should be your name. Defaults to `gh-pages-deploy@jives.dev` | `env` | **No** |
|
| `COMMIT_NAME` | Used to sign the commit, this should be your name. If not provided it will default to `username@users.noreply.github.com` | `env` | **No** |
|
||||||
| `COMMIT_EMAIL` | Used to sign the commit, this should be your email. Defaults to `GitHub Pages Deployer` | `env` | **No** |
|
| `COMMIT_EMAIL` | Used to sign the commit, this should be your email. If not provided it will default to your username. | `env` | **No** |
|
||||||
|
|
||||||
With the action correctly configured you should see something similar to this in your GitHub action workflow editor.
|
With the action correctly configured you should see something similar to this in your GitHub actions workflow editor.
|
||||||
|
|
||||||
![Example](screenshot.png)
|
![Example](screenshot.png)
|
||||||
|
@ -17,6 +17,10 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$FOLDER" == "/" ]]; then
|
||||||
|
FOLDER=$GITHUB_WORKSPACE
|
||||||
|
else
|
||||||
|
|
||||||
|
|
||||||
## Initializes Variables
|
## Initializes Variables
|
||||||
REPOSITORY_PATH="https://${ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" && \
|
REPOSITORY_PATH="https://${ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" && \
|
||||||
|
Loading…
Reference in New Issue
Block a user