mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 22:56:54 +08:00
docs: update for v3
This commit is contained in:
parent
ccf71d1162
commit
be27dcce48
40
README.md
40
README.md
@ -341,35 +341,33 @@ name: github pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-deploy:
|
build-deploy:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Some build
|
- name: Some build
|
||||||
|
|
||||||
- name: Prepare tag
|
- name: Prepare tag
|
||||||
id: prepare_tag
|
id: prepare_tag
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
run: |
|
run: |
|
||||||
TAG_NAME="${GITHUB_REF##refs/tags/}"
|
TAG_NAME="${GITHUB_REF##refs/tags/}"
|
||||||
echo "::set-output name=tag_name::${TAG_NAME}"
|
echo "::set-output name=tag_name::${TAG_NAME}"
|
||||||
echo "::set-output name=deploy_tag_name::deploy-${TAG_NAME}"
|
echo "::set-output name=deploy_tag_name::deploy-${TAG_NAME}"
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v2
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
env:
|
with:
|
||||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
PUBLISH_BRANCH: gh-pages
|
publish_dir: ./public
|
||||||
PUBLISH_DIR: ./public
|
tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
|
||||||
with:
|
tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
|
||||||
tagName: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
|
|
||||||
tagMessage: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Commands on a local machine.
|
Commands on a local machine.
|
||||||
@ -386,8 +384,6 @@ deploy-v1.2.3 # Tag on the gh-pages branch
|
|||||||
v1.2.3 # Tag on the master branch
|
v1.2.3 # Tag on the master branch
|
||||||
```
|
```
|
||||||
|
|
||||||
We can set `tagOverwrite` option to `true` for overwriting a tag.
|
|
||||||
|
|
||||||
### ⭐️ Script mode
|
### ⭐️ Script mode
|
||||||
|
|
||||||
From `v2.5.0`, we can run this action as a shell script.
|
From `v2.5.0`, we can run this action as a shell script.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user