Skip to content

Commit 9d368cc

Browse files
committed
let Travis deploy the microsite
1 parent 6a548a1 commit 9d368cc

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
language: scala
2+
sudo: false
3+
4+
env:
5+
global:
6+
secure: "NhcuUIVAtUcwXRNKN3TDvhuPBtRy6kpUGRnnRlqZMsPcJe1tScaA1/WnhbNjcDrvMGyMuNImXtfWIVS3h0QD5rpnc/FsAY4P5/QOA3fwQo49rRwGThIcI6liU2+IZxgjI0C3gIoR+7gP1xuZLvQSEa2ZVglUbolUTPWu8aIG3Us="
27

38
before_install:
49
- export PATH="$PATH:./vendor/bundle"
@@ -12,6 +17,13 @@ install:
1217
script:
1318
- sbt makeMicrosite
1419

20+
deploy:
21+
- provider: script
22+
script: deploy-microsite.sh
23+
skip_cleanup: true
24+
on:
25+
branch: typelevel-readme
26+
1527
cache:
1628
directories:
1729
- $HOME/.ivy2/cache

build.sbt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,11 @@ micrositePalette := Map(
2121
"gray-lighter" -> "#F6F6F6",
2222
"white-color" -> "#FFFFFF")
2323

24-
enablePlugins(MicrositesPlugin)
24+
enablePlugins(MicrositesPlugin)
25+
26+
sys.env.get("GH_TOKEN") match {
27+
case None => Seq()
28+
case Some(token) => Seq(
29+
git.remoteRepo := s"https://$token@github.com/${micrositeGithubOwner.value}/${micrositeGithubRepo.value}.git"
30+
)
31+
}

deploy-microsite.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
GIT_EMAIL="[email protected]"
6+
GIT_NAME="Typelevel Bot"
7+
8+
git config --global user.name "$GIT_NAME"
9+
git config --global user.email "$GIT_EMAIL"
10+
11+
sbt publishMicrosite

0 commit comments

Comments
 (0)