GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly. https://github.com/marketplace/actions/github-pages-action
Go to file
Zero 3400745573 Update README.md (#1)
"Supprt" > "Support" on the penultimate line.
2019-05-22 15:15:31 +09:00
.github add: action 2019-05-22 06:53:54 +09:00
images add: action 2019-05-22 06:53:54 +09:00
.dockerignore add: action 2019-05-22 06:53:54 +09:00
Dockerfile add: action 2019-05-22 06:53:54 +09:00
LICENSE add: action 2019-05-22 06:53:54 +09:00
README.md Update README.md (#1) 2019-05-22 15:15:31 +09:00
entrypoint.sh add: action 2019-05-22 06:53:54 +09:00

README.md

license release GitHub release date

GitHub Actions for deploying to GitHub Pages with Static Site Generators

GitHub Actions for deploying to GitHub Pages

A GitHub Action to deploy your static site to GitHub Pages with Static Site Generators (Hugo, MkDocs, Gatsby, GitBook, etc.)

Getting started

(1) Add deploy Key

  1. Generate deploy key ssh-keygen -t rsa -b 4096 -C "your@email.com" -f gh-pages -N ""
    • You will get 2 files: gh-pages.pub (public key) and gh-pages (private key)
  2. Go to "Settings > Deploy Keys" of repository.
  3. Add your public key within "Allow write access" option.
  4. Go to "Settings > Secrets" of repository.
  5. Add your private key as ACTIONS_DEPLOY_KEY

(2) Create main.workflow

An example with Hugo action.

workflow "GitHub Pages" {
  on = "push"
  resolves = ["deploy"]
}

action "is-branch-master" {
  uses = "actions/bin/filter@master"
  args = "branch master"
}

action "build" {
  needs = "is-branch-master"
  uses = "peaceiris/actions-hugo@v0.55.6"
  args = ["--gc", "--minify", "--cleanDestinationDir"]
}

action "deploy" {
  needs = "build"
  uses = "peaceiris/actions-gh-pages@v1.0.0"
  env = {
    PUBLISH_DIR = "./public"
    PUBLISH_BRANCH = "gh-pages"
  }
  secrets = ["ACTIONS_DEPLOY_KEY"]
}

License

MIT License - peaceiris/actions-gh-pages

Support the author

peaceiris - Patreon