adds gitlab ci
This commit is contained in:
22
.gitlab-ci.yml
Normal file
22
.gitlab-ci.yml
Normal 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"
|
Reference in New Issue
Block a user