docs: update example of publish_branch
This commit is contained in:
parent
e8d0817a48
commit
2948e5eda8
19
README.md
19
README.md
|
@ -149,7 +149,7 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-deploy:
|
deploy:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
@ -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),
|
For [User and Organization Pages sites] (`<username>/<username>.github.io` repository),
|
||||||
we have to set `master` branch to `PUBLISH_BRANCH`.
|
we have to set `master` branch to `PUBLISH_BRANCH`.
|
||||||
|
|
||||||
|
A default value of `publish_branch` is `gh-pages`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- source # default branch
|
- 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
|
[Project Pages sites]: https://help.github.com/en/articles/user-organization-and-project-pages#project-pages-sites
|
||||||
|
|
Loading…
Reference in New Issue