Update GitLab CI configuration

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2018-06-06 20:31:40 -04:00
parent 9e47e1d01c
commit a8c64034f6
+29 -9
View File
@@ -1,20 +1,40 @@
image: node:8
pages:
stage: deploy
variables:
REACT_APP_FAKE_API: 1
build:
stage: build
script:
- npm install
- npm run gulp sass
- npm run build-fake
- rm -rf public
- mv build public
- rm -r public/fakeAPI
- npm run build
- tar -czvf pihole-web.tar.gz -C build .
- wget https://ftl.pi-hole.net:8080/FTL-client
- chmod +x ./FTL-client
- ./FTL-client "$CI_COMMIT_REF_NAME" pihole-web.tar.gz "$FTL_SECRET"
- rm ./FTL-client
cache:
key: branch:$CI_COMMIT_REF_SLUG
paths:
- node_modules/
artifacts:
paths:
- public # mandatory, other folder won't work
- pihole-web.tar.gz
pages:
stage: deploy
variables:
PUBLIC_URL: "/"
script:
- npm install
- npm run gulp sass
- rm public/fakeAPI/.gitignore # Make sure that the fakeAPI data is deployed
- npm run build-fake
- echo "web.pi-hole.io" > build/CNAME
cache:
key: deploy
policy: pull
paths:
- node_modules/
only:
- master
- master
when: manual