-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
101 lines (89 loc) · 4.65 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
dist: xenial
language: node_js
git:
depth: 5
node_js: "10"
cache: yarn
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn install --frozen-lockfile
.env:
github_keys: &github_keys
- secure: "C3JDVv+f5+UhfL7GdF7GjiCp74YPm8XtVUpYKiDqNd9HJORYCGUtiM/6fLicE+CVvbQPSDBk+GgQtYkYdZiBv9A9rVp7mOqGMJ/D+c7gx1GhFvL9/KFN/BPM+xAwlb6e0nSztmLFp6ugz/BwsshuoEok1VYXIi+5X7rqhnr/eWarX/v7cSPRBbWb58G74Azybc6XlHNHakpJGq2f5p6NNmveuIwXasRjsTzL7dh2HOkUGHB757p6Zqi5dqfXKxhwcSGIIlIwRutd9JaT2GJ05981pclh32Sx/FhbRBd2kbSZz5dj0Mbr9idvSVxHyWKjwCFCZudFSarEvgymgn5NvY9vnPq/kxSKePx4lHXrMhjsBi51fOxeZg8rnLcsuNKSrzjxp6zVU/TIjNhioe0EEcH2V7KhP3IGvkdKdoIGa520fWb/MXkRcQaKlJ42hVZChHNLZ7W/DpYyTJugDP+3QQR3fOlyUwzqAGyeBSjmUzghn/oWurTv4W6upR02ooS+fxbgMwfv1jJG4TEou5tM5l0WQxNQt9Jor6hmEtc9As1RYCBSbJfzaC6iD3gP6XJ25NFgXvcJx5AHwFoO6OYxVnd7VRlWZSsUbCAkgpVS6KVNIQk79ViCdcFBRt50iEeReWAW2WidnVfH+CMGp263VUE07+DTmGkdapUgB02iMmA="
npm_keys: &npm_keys
- secure: "RP6Vt7h6SopCqQcneCXl87fUHPZGQYl5vO26W/oPZ/zLI7doTg9JPXqwsSXpBfD+zbKd1ZCzJg1ETnHQi2VHueHUT/hvLjdjGW/wU8PGedA3sAxfL8wYGa23v2cJefOX69Fe392liul6YXXo9JFHd6KimH9qu2xmcBsWNXsOh5jHjSI2t9YrVHbRp3MVPTVqM1oMvOSBjlPA3BDIGAWaxLjiwGIAXZT07pzyqjetVGL7moiiYXgoPU7/EOAoSqZdtzg9GmUAsXMpe3gfgxXGruGVWwRQRdHKmg1pCwHLeIg34XSqrXor464LAz2mYOl3chGF127oCBBuaeytkFl523YMv7FCrv4kN9UFgNMz3z66sxst6RQkmtoMjq9+GjbCSLg/PAyg3OYZMP8Ew64mDVuqZfjctT9KW7bigGmE3sluRslkSEA60FqlT/zKFj6FgIzzKVUpnFr1jcNIRCBT+BrTFFuFd3Cl7/T8PIZ+TWTjgB8ed+ra1hTL+vvCUYZiRauSeQMz8bFhsAGXD0SXEflBMor0pgvZKSRxhMjFYXpVUgdO6L/B+vNSN4uqx0klm7RdW310jxgcoHNptthVm02FY3xM++tIkJfVJ+OnTiA6mNpQEjMb+DlCojO6Zf+Zv0TESYp3pjqHjcOyQejahCTnB96edBbVV1WvwB5RRMI="
.deploy_to_ghpages: &deploy_to_ghpages
provider: pages
github-token: "$GITHUB_TOKEN"
keep-history: true
local_dir: out
skip_cleanup: true
target-branch: gh-pages
jobs:
include:
- stage: Build
if: NOT env(RELEASE)
env:
- *github_keys
script:
- yarn build --ignore docs
- yarn lint
- yarn test
#
- export SOCIALGOUV_BOOTSTRAP_VERSION=${TRAVIS_BRANCH}
- export SOCIALGOUV_BOOTSTRAP_CORE_INTEGRITY=$(cat packages/core/dist/socialgouv-bootstrap.min.css | openssl dgst -sha384 -binary | openssl enc -base64 -A )
- npx envsub --protect docs/config.toml docs/config.toml
#
- yarn workspace docs nps build
- yarn workspace docs nps "build.hugo --baseURL /bootstrap/$TRAVIS_BRANCH/docs"
before_deploy:
- |
git config user.name "Social Groovy Bot"
git config user.email "[email protected]"
git remote set-url origin https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}
wget https://github.com/SocialGouv/bootstrap/archive/gh-pages.zip &&
unzip gh-pages.zip &&
mv bootstrap-gh-pages out &&
rm -rf out/$TRAVIS_BRANCH &&
mkdir -p out/$TRAVIS_BRANCH/docs &&
mv docs/public/* out/$TRAVIS_BRANCH/docs &&
cp docs/assets/302.html out/index.hml &&
cp docs/assets/302.html out/$TRAVIS_BRANCH/index.hml &&
mkdir -p out/$TRAVIS_BRANCH/@socialgouv/bootstrap.core &&
mv packages/core/dist out/$TRAVIS_BRANCH/@socialgouv/bootstrap.core/dist &&
mv packages/core/fonts out/$TRAVIS_BRANCH/@socialgouv/bootstrap.core/fonts &&
mv packages/core/images out/$TRAVIS_BRANCH/@socialgouv/bootstrap.core/images &&
mv packages/core/LICENSE out/$TRAVIS_BRANCH/@socialgouv/bootstrap.core/LICENSE &&
mv packages/core/package.json out/$TRAVIS_BRANCH/@socialgouv/bootstrap.core/package.json
deploy:
- <<: *deploy_to_ghpages
on:
branch: master
- <<: *deploy_to_ghpages
on:
tags: true
- stage: Release
if: env(RELEASE)
git:
# NOTE(douglasduteil): disable git --depth
# Try to have all the commits for the release Change Log
# see travis-ci/travis-ci#3412
depth: 9999999 # Over 9000 !
env:
- *github_keys
- *npm_keys
install: yarn --frozen-lockfile
before_script:
- npm config set access public
- npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
- git checkout ${TRAVIS_BRANCH}
- git config user.name "Social Groovy Bot"
- git config user.email "[email protected]"
- git remote set-url origin https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
script:
- yarn build
after_success:
- GH_TOKEN=${GITHUB_TOKEN} yarn lerna version ${LERNA_ARGS:=--yes}
- yarn lerna publish from-git --yes