Skip to content

Rewrite

Rewrite #57

Workflow file for this run

name: "Deploy to GitHub Pages"
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.142.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@v4
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.142.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