github peaceiris/actions-gh-pages v2.5.0

latest releases: v4, v4.0.0, v3...
4 years ago

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.

Implemented by @skyfrk #36

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 requires SCRIPT_MODE: true
  • *_TOKEN do not require SCRIPT_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

Don't miss a new actions-gh-pages release

NewReleases is sending notifications on new releases.