45 lines
937 B
YAML
45 lines
937 B
YAML
# gitea/actions/hugo-deploy.yml
|
|
name: Deploy Hugo Site
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Clone Repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
|
|
- name: Change to Repo Directory
|
|
run: cd $GITEA_WORKSPACE
|
|
|
|
- name: Install Hugo
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y hugo
|
|
|
|
- name: Build Hugo Site
|
|
run: hugo --minify --config hugo.toml -d /output
|
|
|
|
# - name: Debug
|
|
# run: |
|
|
# apt-get install -y tree
|
|
# tree /
|
|
|
|
# - name: Deploy Hugo Site
|
|
# run: |
|
|
# docker run --rm \
|
|
# --mount type=bind,source=/var/gitea/hugo-output,target=/output \
|
|
# ubuntu:latest \
|
|
# /bin/bash -c "echo 'This is a test' > /output/index.html"
|
|
- name: Deploy Hugo Site
|
|
run: docker cp /output/. gitea-runner:/output
|
|
|