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