This repository has been archived by the owner on Jul 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
66 lines (61 loc) · 2.35 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Travis locally: https://stackoverflow.com/questions/21053657/how-to-run-travis-ci-locally
language: node_js
cache: yarn
before_install:
# - echo "TRAVIS_BRANCH= $TRAVIS_BRANCH"
# - echo "TRAVIS_COMMIT= $TRAVIS_COMMIT"
# - echo "TRAVIS_TAG= $TRAVIS_TAG"
# - echo "TRAVIS_BUILD_STAGE_NAME= $TRAVIS_BUILD_STAGE_NAME"
# - echo ""
# - echo "TRAVIS_COMMIT_RANGE= $TRAVIS_COMMIT_RANGE"
# - echo ""
# - echo ""
# - echo "TRAVIS_COMMIT_MESSAGE= $TRAVIS_COMMIT_MESSAGE"
# - echo ""
# - exit 1;
# - wget -qO content.tgz "https://gitlab.com/api/v4/projects/$GAIAMA_CONTENT_ID/repository/archive?private_token=$GAIAMA_CONTENT_TOKEN"; fi
# - mkdir content
# - tar -xzf content.tgz -C content
# get branch specific content
# - wget -qO content.tgz "https://gitlab.com/api/v4/projects/$GAIAMA_CONTENT_ID/repository/archive?sha=$TRAVIS_BRANCH&private_token=$GAIAMA_CONTENT_TOKEN"
# if no branch specific content downloaded get master content
# - if [ ! -d "src" ]; then wget -qO content.tgz "https://gitlab.com/api/v4/projects/$GAIAMA_CONTENT_ID/repository/archive?private_token=$GAIAMA_CONTENT_TOKEN"; fi
before_script:
- source scripts/init-env.sh
script:
#- echo "noop"
# - if [[ $TRAVIS_COMMIT_MESSAGE == "chore(release): p9g"* ]]; then cd sites/p9g; fi;
- cd sites/$GAIAMA_SITE_NAME
- yarn build
before_deploy:
- yarn global add netlify-cli
deploy:
- provider: script
script: netlify deploy --prod
skip_cleanup: true
on:
branch: master
- provider: script
script: netlify deploy
skip_cleanup: true
on:
condition: $TRAVIS_BRANCH != "master"
# - provider: script
# script: curl -X POST -d '' "https://api.netlify.com/build_hooks/$NETLIFY_BUILD_HOOK_ID_V2"
# skip_cleanup: true
# on:
# tags: true
# #branch: v2
- provider: script
# script: netlifyctl -A $NETLIFY_ACCESS_TOKEN deploy -s gaiama -t -p ./public
script: netlify deploy --prod --site gaiama --dir ./public
# script: zip -r public.zip public && curl -H "Content-Type: application/zip" -H "Authorization: Bearer $NETLIFY_ACCESS_TOKEN" --data-binary "@public.zip" https://api.netlify.com/api/v1/sites/gaiama/deploys
skip_cleanup: true
on:
# branch: master
tags: true
# - provider: script
# script: netlify deploy -s dev -t $NETLIFY_ACCESS_TOKEN -p ./public
# skip_cleanup: true
# on:
# branch: dev