Deploy Hugo website to Github Pages #101
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: Deploy Hugo website to Github Pages | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.116.1' | |
extended: true | |
- name: Build Site | |
run: hugo | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
deploy_key: ${{secrets.ACTIONS_DEPLOY_KEY}} | |
external_repository: DreamOneX/dreamonex.github.io | |
publish_branch: master | |
# cname: blog.dreamonex.eu.org | |
user_name: DreamOneX | |
user_email: me@dreamonex.eu.org | |
publish_dir: ./public |