ci: deploy www/ to /opt/www/lumbda on every master push
Resolves the www/whitepaper.pdf symlink to a real file before rsync (deploy-www.sh preserves symlinks, which would land broken on the proxy), writes version.json with the commit SHA, then calls deploy-www.sh lumbda www via sudo. Runs on the proxy.uncloseai.com runner, same pattern as cuppcb.com and the rest of the static fleet.
This commit is contained in:
parent
94b29421ed
commit
39414d4174
1 changed files with 16 additions and 0 deletions
16
.gitlab-ci.yml
Normal file
16
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
stages:
|
||||
- deploy
|
||||
|
||||
# deploy-www.sh uses rsync -a (preserves symlinks). www/whitepaper.pdf is a
|
||||
# symlink to ../whitepaper/lumbda-whitepaper.pdf inside the repo, which would
|
||||
# land broken on the proxy. Resolve it to a real file before rsync'ing.
|
||||
deploy:
|
||||
stage: deploy
|
||||
tags: ["proxy.uncloseai.com"]
|
||||
script:
|
||||
- cp -L www/whitepaper.pdf www/whitepaper.pdf.real
|
||||
- mv www/whitepaper.pdf.real www/whitepaper.pdf
|
||||
- echo "{\"commit\":\"$CI_COMMIT_SHA\",\"ref\":\"$CI_COMMIT_REF_NAME\"}" > www/version.json
|
||||
- sudo /usr/local/bin/deploy-www.sh lumbda www
|
||||
rules:
|
||||
- if: '$CI_COMMIT_REF_NAME == "master"'
|
||||
Loading…
Add table
Add a link
Reference in a new issue