Skip to content

Commit

Permalink
use GitHub Actions instead of Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Nov 24, 2020
1 parent a8ad5ee commit b4fcacf
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 78 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: ci
on:
push:
pull_request:
schedule:
- cron: '0 11 * * *'
jobs:
test:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- java: 8
- java: 11
steps:
- uses: olafurpg/setup-scala@v10
with:
java-version: "adopt@1.${{ matrix.java }}"
- uses: actions/[email protected]
- uses: coursier/cache-action@v5
- run: sbt -v test
- if: ${{ matrix.java == 8 }} # TODO https://github.com/sbt/sbt-proguard/issues/33
run: |
sbt -v publishLocal "project plugin" "^ scripted" &&
java -jar ./target/scala-2.11/proguard/conscript-*.jar --version
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY_1 }}
- name: Push to gh-pages
if: ${{ !github.event.repository.fork && github.ref == 'refs/heads/master' && github.event_name == 'push' && matrix.java == 8 }}
run: |
git config --global user.email "74864734+foundweekends-bot[bot]@users.noreply.github.com"
git config --global user.name "foundweekends-bot[bot]"
# https://github.com/sbt/sbt-ghpages/commit/cbedd8edb8
export SBT_GHPAGES_COMMIT_MESSAGE="auto commit on CI https://github.com/foundweekends/conscript/commit/${{ github.sha }}"
sbt -v pushSiteIfChanged
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

9 changes: 0 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ lazy val root = (project in file(".")).
val repo = ghpagesUpdatedRepository.value
val s = streams.value
val r = GitKeys.gitRunner.value
gitConfig(repo, r, s.log)
gitRemoveFiles(repo, (repo * "*.html").get.toList, r, s)
val mappings = for {
(file, target) <- siteMappings.value
Expand Down Expand Up @@ -200,11 +199,3 @@ def gitDocsChanged(dir: File, git: GitRunner, log: Logger): Boolean =
val stat = git(("diff" :: "--shortstat" :: range :: "docs" :: Nil) :_*)(dir, log)
stat.trim.nonEmpty
}

def gitConfig(dir: File, git: GitRunner, log: Logger): Unit =
sys.env.get("TRAVIS") match {
case Some(_) =>
git(("config" :: "user.name" :: "Travis CI" :: Nil) :_*)(dir, log)
git(("config" :: "user.email" :: "[email protected]" :: Nil) :_*)(dir, log)
case _ => ()
}
36 changes: 0 additions & 36 deletions deploy_key.enc

This file was deleted.

9 changes: 0 additions & 9 deletions publish-site.sh

This file was deleted.

0 comments on commit b4fcacf

Please sign in to comment.