Skip to content

Commit

Permalink
docs: update example of publish_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Feb 6, 2020
1 parent e8d0817 commit 2948e5e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ on:
- master
jobs:
build-deploy:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -186,13 +186,28 @@ The above example is for [Project Pages sites]. (`<username>/<project_name>` rep
For [User and Organization Pages sites] (`<username>/<username>.github.io` repository),
we have to set `master` branch to `PUBLISH_BRANCH`.

A default value of `publish_branch` is `gh-pages`.

```yaml
on:
push:
branches:
- source # default branch
publish_branch: master # deploying branch
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: somebuild
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./public
publish_branch: master # deploying branch
```

[Project Pages sites]: https://help.github.com/en/articles/user-organization-and-project-pages#project-pages-sites
Expand Down

0 comments on commit 2948e5e

Please sign in to comment.