From a8c64034f60d1c7ea31dc36f6d8e8401ecbcf6ec Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Wed, 6 Jun 2018 20:31:40 -0400 Subject: [PATCH] Update GitLab CI configuration Signed-off-by: Mcat12 --- .gitlab-ci.yml | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f2a1701..07f7aae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 \ No newline at end of file + - master + when: manual \ No newline at end of file