Nathan Schneider 521c782c42 Initial commit
2025-03-23 21:44:39 -06:00

49 lines
1006 B
YAML

image: registry.gitlab.com/pages/hugo:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- deploy
build:
stage: build
script:
- hugo --minify
artifacts:
paths:
- public
only:
- master
pages:
stage: deploy
script:
- echo "Deploying to GitLab Pages..."
artifacts:
paths:
- public
only:
- master
# Self-hosted deployment using rsync
# Uncomment and configure this job for deploying to your own server
# deploy:
# stage: deploy
# image: alpine:latest
# before_script:
# - apk add --no-cache openssh-client rsync
# - eval $(ssh-agent -s)
# - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
# - mkdir -p ~/.ssh
# - chmod 700 ~/.ssh
# - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
# - chmod 644 ~/.ssh/known_hosts
# script:
# - rsync -avuz --delete public/ $SSH_USER@$SSH_HOST:$DEPLOY_PATH
# only:
# - master
# environment:
# name: production
# url: https://your-domain.com