Skip to content

Commit

Permalink
Default deploy branch to master since that's what is needed for org a…
Browse files Browse the repository at this point in the history
…nd user pages.
  • Loading branch information
enriikke committed Jul 16, 2019
1 parent 645c672 commit 6f11d33
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ workflow "Gatsby to GitHub Pages" {
resolves = ["Publish"]
}
action "On Master" {
action "On Dev" {
uses = "actions/bin/filter@master"
args = "branch master"
args = "branch dev"
}
action "Publish" {
uses = "enriikke/gatsby-gh-pages-action@master"
needs = ["On Master"]
uses = "enriikke/gatsby-gh-pages-action@@1.0.1"
needs = ["On Dev"]
secrets = ["ACCESS_TOKEN"]
}
```
Expand All @@ -45,9 +45,11 @@ action "Publish" {
This Action is fairly simple but it does provide you with a couple of
configuration options:

- **DEPLOY_BRANCH**: The repository branch used for your GitHub Page and where
the Gatsby build will be pushed. Defined as an [environment variable](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables).
Defaults to `gh-pages`.
- **DEPLOY_BRANCH**: The branch expected by GitHub to have the static files
needed for your site. For org and user pages it should always be `master`.
This is where the output of `gatsby build` will be pushed to. Defined as an
[environment variable](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables).
Defaults to `master`.

- **ARGS**: Additional arguments that get passed to `gatsby build`. See the
[Gatsby documentation](https://www.gatsbyjs.org/docs/gatsby-cli/#build) for a
Expand All @@ -57,8 +59,8 @@ configuration options:
### Org or User Pages

Create a repository with the format `<YOUR/ORG USERNAME>.github.io`, push your
Gatsby source code to the `master` branch, and add this GitHub Action to your
workflow! 🚀😃
Gatsby source code to a branch different than your `DEPLOY_BRANCH` and add this
GitHub Action to your workflow! 🚀😃

### Repository Pages

Expand Down
2 changes: 1 addition & 1 deletion entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail


if [[ -z "$DEPLOY_BRANCH" ]]; then
DEPLOY_BRANCH="gh-pages"
DEPLOY_BRANCH="master"
echo "No deploy branch specified. Using default $DEPLOY_BRANCH."
else
echo "Using provided deploy branch $DEPLOY_BRANCH."
Expand Down

0 comments on commit 6f11d33

Please sign in to comment.