mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Checks for relative path names (#15)
* Relative * Update entrypoint.sh * Update entrypoint.sh * Another test * Update entrypoint.sh * Update entrypoint.sh
This commit is contained in:
parent
f5a4689a00
commit
f7faf642c5
@ -43,7 +43,7 @@ Below you'll find a description of what each option does.
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| `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** |
|
||||
| `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. | `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. **Folder paths cannot have a leading `/` or `./`**. | `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** |
|
||||
| `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** |
|
||||
| `CNAME` | If you're using a [custom domain](https://help.github.com/en/articles/using-a-custom-domain-with-github-pages), you will need to add the domain name to the `CNAME` environment variable. If you don't do this GitHub will wipe out your domain configuration after each deploy. This value will look something like this: `jives.dev`. | `env` | **No** |
|
||||
|
9
action.yml
Normal file
9
action.yml
Normal file
@ -0,0 +1,9 @@
|
||||
name: 'Deploy to GitHub Pages'
|
||||
description: 'This action will handle the building and deploying process of your project to GitHub Pages.'
|
||||
author: 'James Ives <iam@jamesiv.es>'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
branding:
|
||||
icon: 'git-commit'
|
||||
color: 'orange'
|
@ -20,6 +20,11 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$FOLDER" in /*|./*)
|
||||
echo "The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly."
|
||||
exit 1
|
||||
esac
|
||||
|
||||
if [ -z "$COMMIT_EMAIL" ]
|
||||
then
|
||||
COMMIT_EMAIL="${GITHUB_ACTOR}@users.noreply.github.com"
|
||||
|
Loading…
Reference in New Issue
Block a user