Skip to content

Deploy to GitHub Pages #61

Deploy to GitHub Pages

Deploy to GitHub Pages #61

name: "Deploy to GitHub Pages"
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.133.0"
extended: true
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.ghpat }}
publish_dir: ./public
cname: digitalevidencetoolkit.org
preview:
runs-on: ubuntu-20.04
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v2
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.133.0"
extended: true
- name: Build
run: hugo --minify
- name: Deploy Preview
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.ghpat }}
publish_dir: ./public
cname: pr-${{ github.event.pull_request.number }}.digitalevidencetoolkit.org