Skip to content

Commit 2948e5e

Browse files
committed
docs: update example of publish_branch
1 parent e8d0817 commit 2948e5e

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ on:
149149
- master
150150
151151
jobs:
152-
build-deploy:
152+
deploy:
153153
runs-on: ubuntu-18.04
154154
steps:
155155
- uses: actions/checkout@v1
@@ -186,13 +186,28 @@ The above example is for [Project Pages sites]. (`<username>/<project_name>` rep
186186
For [User and Organization Pages sites] (`<username>/<username>.github.io` repository),
187187
we have to set `master` branch to `PUBLISH_BRANCH`.
188188

189+
A default value of `publish_branch` is `gh-pages`.
190+
189191
```yaml
190192
on:
191193
push:
192194
branches:
193195
- source # default branch
194196
195-
publish_branch: master # deploying branch
197+
jobs:
198+
deploy:
199+
runs-on: ubuntu-18.04
200+
steps:
201+
- uses: actions/checkout@v2
202+
203+
- run: somebuild
204+
205+
- name: Deploy
206+
uses: peaceiris/actions-gh-pages@v3
207+
with:
208+
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
209+
publish_dir: ./public
210+
publish_branch: master # deploying branch
196211
```
197212

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

0 commit comments

Comments
 (0)