Skip to content

Commit b4fcacf

Browse files
committed
1 parent a8ad5ee commit b4fcacf

File tree

5 files changed

+38
-78
lines changed

5 files changed

+38
-78
lines changed

.github/workflows/ci.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: ci
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: '0 11 * * *'
7+
jobs:
8+
test:
9+
timeout-minutes: 30
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- java: 8
16+
- java: 11
17+
steps:
18+
- uses: olafurpg/setup-scala@v10
19+
with:
20+
java-version: "adopt@1.${{ matrix.java }}"
21+
- uses: actions/checkout@v2.3.4
22+
- uses: coursier/cache-action@v5
23+
- run: sbt -v test
24+
- if: ${{ matrix.java == 8 }} # TODO https://github.com/sbt/sbt-proguard/issues/33
25+
run: |
26+
sbt -v publishLocal "project plugin" "^ scripted" &&
27+
java -jar ./target/scala-2.11/proguard/conscript-*.jar --version
28+
- uses: webfactory/ssh-agent@v0.4.1
29+
with:
30+
ssh-private-key: ${{ secrets.DEPLOY_KEY_1 }}
31+
- name: Push to gh-pages
32+
if: ${{ !github.event.repository.fork && github.ref == 'refs/heads/master' && github.event_name == 'push' && matrix.java == 8 }}
33+
run: |
34+
git config --global user.email "74864734+foundweekends-bot[bot]@users.noreply.github.com"
35+
git config --global user.name "foundweekends-bot[bot]"
36+
# https://github.com/sbt/sbt-ghpages/commit/cbedd8edb8
37+
export SBT_GHPAGES_COMMIT_MESSAGE="auto commit on CI https://github.com/foundweekends/conscript/commit/${{ github.sha }}"
38+
sbt -v pushSiteIfChanged

.travis.yml

-24
This file was deleted.

build.sbt

-9
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ lazy val root = (project in file(".")).
135135
val repo = ghpagesUpdatedRepository.value
136136
val s = streams.value
137137
val r = GitKeys.gitRunner.value
138-
gitConfig(repo, r, s.log)
139138
gitRemoveFiles(repo, (repo * "*.html").get.toList, r, s)
140139
val mappings = for {
141140
(file, target) <- siteMappings.value
@@ -200,11 +199,3 @@ def gitDocsChanged(dir: File, git: GitRunner, log: Logger): Boolean =
200199
val stat = git(("diff" :: "--shortstat" :: range :: "docs" :: Nil) :_*)(dir, log)
201200
stat.trim.nonEmpty
202201
}
203-
204-
def gitConfig(dir: File, git: GitRunner, log: Logger): Unit =
205-
sys.env.get("TRAVIS") match {
206-
case Some(_) =>
207-
git(("config" :: "user.name" :: "Travis CI" :: Nil) :_*)(dir, log)
208-
git(("config" :: "user.email" :: "eed3si9n@gmail.com" :: Nil) :_*)(dir, log)
209-
case _ => ()
210-
}

deploy_key.enc

-36
This file was deleted.

publish-site.sh

-9
This file was deleted.

0 commit comments

Comments
 (0)