adds gitlab ci

This commit is contained in:
Drew
2025-04-16 09:18:12 -06:00
parent 85cac93f19
commit a6dc11fd95
2 changed files with 22 additions and 57 deletions

22
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,22 @@
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"