用于使用静态站点生成器部署到GitHub页面的GitHub Actions
用于使用静态站点生成器部署到GitHub页面的GitHub Actions github-actions released this
See CHANGELOG.md for more details.
Assets
2
github-actions released this
See CHANGELOG.md for more details.
Assets
2
See CHANGELOG.md for more details.
Assets
2
github-actions released this
Assets
2
github-actions released this
New Features
- Supports
ubuntu-16.04
Document Enhancement
- Python example workflow
- Bumps actions/setup-python from v1 to v2
- Bumps python from 3.6 to 3.8
- Docusaurus example workflow
- Changes workflow level
defaults.run.working-directory
to job level
- Changes workflow level
See CHANGELOG.md for more details.
Assets
2
github-actions released this
CI enhancement, Dependencies update, and Documentation improvement.
See CHANGELOG.md for more details.
This action was featured at GitHub Action Hero: Shohei Ueda - The GitHub Blog. Thanks all.
Documentation updates
- Add example workflow for Swift Publish
- Add example workflow for github/personal-website
- Improve Docusaurus example workflow
- Improve Elm example workflow
- Improve Flutter example workflow
Assets
2
github-actions released this
See CHANGELOG.md for more details.
Assets
2
github-actions released this
See CHANGELOG.md for more details.
Assets
2
github-actions released this
See CHANGELOG.md for more details.
Assets
2
github-actions released this
- Put
github_token
as the first example.
See CHANGELOG.md for more details.
Assets
2
github-actions released this
Pre-release for #119
See CHANGELOG.md for more details.
Assets
2
github-actions released this
See CHANGELOG.md for more details.
Assets
2
deps: bump alpine from 3.11.2 to 3.11.3
Assets
2
New Feature
New options tagName
, tagMessage
, and tagOverwrite
.
Suggested by @cinderblock #76 #78
Here is an example workflow.
name: github pages
on:
push:
branches:
- master
tags:
- 'v*.*.*'
jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Some build
- name: Prepare tag
id: prepare_tag
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG_NAME="${GITHUB_REF##refs/tags/}"
echo "::set-output name=tag_name::${TAG_NAME}"
echo "::set-output name=deploy_tag_name::deploy-${TAG_NAME}"
- name: Deploy
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
with:
tagName: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
tagMessage: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
Commands on a local machine.
$ # On the master branch
$ git tag -a "v1.2.3" -m "Release v1.2.3"
$ git push origin "v1.2.3"
$ # After deployment
$ git fetch origin
$ git tag
deploy-v1.2.3 # Tag on the gh-pages branch
v1.2.3 # Tag on the master branch
We can set tagOverwrite
option to true
for overwriting a tag.
Assets
2
Release v2.9.0
New Feature
Custom commit message option #75
When we create a commit with a message docs: Update some post
, a deployment commit will be generated with a message docs: Update some post ${GITHUB_SHA}
.
- name: Deploy
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
with:
commitMessage: ${{ github.event.head_commit.message }}
Suggested by @fabiosangregorio #72 #73 #74
Fixes
Add a linkable commit hash for external repository deployment. #73
Mentioned by @fabiosangregorio #72
Assets
2
Release v2.8.0
New Feature
Custom Git username and email #67
Set custom git config user.name
and git config user.email
.
A commit is always created with the same user.
- name: Deploy
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
with:
username: "iris"
useremail: "iris@peaceiris.com"
Assets
2
Pre-release for Pull Request #43
Assets
2
New options
Deploy to external repository
By default, your files are published to the repository which is running this action. If you want to publish to another repository on GitHub, set the environment variable EXTERNAL_REPOSITORY
to <username>/<external-repository>
. This option is available from v2.5.0
.
For example:
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
EXTERNAL_REPOSITORY: username/external-repository
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
You can use ACTIONS_DEPLOY_KEY
or PERSONAL_TOKEN
. When you use ACTIONS_DEPLOY_KEY
, set your private key to the repository which includes this action and set your public key to your external repository.
Be careful, GITHUB_TOKEN
has no permission to access to external repositories.
Script mode
From v2.5.0
, we can run this action as a shell script. There is no Docker build or pull step, so it will start immediately.
ACTIONS_DEPLOY_KEY
requiresSCRIPT_MODE: true
*_TOKEN
do not requireSCRIPT_MODE
- name: Deploy
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
SCRIPT_MODE: true
run: |
wget https://raw.githubusercontent.com/peaceiris/actions-gh-pages/v2.5.0/entrypoint.sh
bash ./entrypoint.sh
Implemented by @peaceiris #38
Assets
2
v2.5.0-rc0 for #36
Assets
2
Release v2.4.0
New feature - Keeping existing files
New option keepFiles
by @RomanHotsiy #33 #34
By default, existing files in the publish branch are removed before adding the ones from publish dir. If you want the action to add new files but leave existing ones untouched, set the optional parameter keepFiles to true.
For example:
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.4.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
with:
keepFiles: true
Assets
2
Release v2.2.0 includes the following updates.
- add:
PERSONAL_TOKEN
- update: readme about PERSONAL_TOKEN`
Create a personal access token (repo
) and add it to Secrets as PERSONAL_TOKEN
, it works as well as ACTIONS_DEPLOY_KEY
.
- ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
+ PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
Assets
2
Watchers:18 |
Star:1798 |
Fork:132 |
创建时间: 2019-05-22 05:20:25 |
最后Commits: 7天前 |
许可协议:MIT |
bbdfb20
Compare
See CHANGELOG.md for more details.