Files
Protocol-oral-history-project/.gitlab-ci.yml
2025-04-16 09:18:12 -06:00

23 lines
680 B
YAML

image: klakegg/hugo:ext
variables:
HUGO_ENV: production
deploy:
stage: deploy
image: node:18
only:
- deploy
before_script:
- npm install -g cloudron-surfer
script:
- hugo version
- hugo --minify --gc --cleanDestinationDir
- echo "Build completed. Public directory contents:"
- ls -la public/
- echo "Deploying to: $SURFER_SERVER"
- tar -czf deploy.tar.gz -C public .
- surfer put --token $SURFER_TOKEN --server $SURFER_SERVER deploy.tar.gz /tmp/deploy.tar.gz
- surfer exec --token $SURFER_TOKEN --server $SURFER_SERVER "tar -xzf /tmp/deploy.tar.gz -C / && rm /tmp/deploy.tar.gz"
- echo "Deployment completed successfully"