Skip to content

Instantly share code, notes, and snippets.

@CH3COOH
Created March 26, 2020 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CH3COOH/3c113b16ad8101f892cfeac32f608b8f to your computer and use it in GitHub Desktop.
Save CH3COOH/3c113b16ad8101f892cfeac32f608b8f to your computer and use it in GitHub Desktop.
作業用リポジトリのmasterにpushするたびに、 GitHub Actionで 静的ファイルを生成して、 公開用リポジトリのmasterブランチへデプロイする
name: github pages
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.62.2'
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: CH3COOH/ch3cooh.github.io
publish_branch: master
publish_dir: ./public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment