Created
March 26, 2020 13:44
-
-
Save CH3COOH/3c113b16ad8101f892cfeac32f608b8f to your computer and use it in GitHub Desktop.
作業用リポジトリのmasterにpushするたびに、 GitHub Actionで 静的ファイルを生成して、 公開用リポジトリのmasterブランチへデプロイする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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