Update gh-pages.yml

This commit is contained in:
Ben Armstead 2021-07-29 07:36:54 +00:00 committed by GitHub
parent f6fd50464f
commit a33f6bd4c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,25 +1,32 @@
name: Build and Deploy
name: Pages
on:
push:
branches:
- master
- main
pull_request:
jobs:
build:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v1
with:
submodules: true
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Test Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Hugo Deploy GitHub Pages
uses: benmatselby/hugo-deploy-gh-pages@master
env:
HUGO_VERSION: 0.68.3
TARGET_REPO: benarmstead/mollyim.github.io
TOKEN: ${{ secrets.TOKEN }}
TARGET_BRANCH: master
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public