diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 7b74f75e3a..0000000000 --- a/.drone.yml +++ /dev/null @@ -1,5 +0,0 @@ -pipeline: - build: - image: scalacenter/scala-rvm-jvm-coursier:2.0 - commands: - - ./scripts/ci.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..775eb48eb0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Build +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.5.8 + bundler-cache: true + - name: Set up coursier + uses: laughedelic/coursier-setup@v1 + with: + jvm: adopt:11 + - name: Run mdoc + run: | + ./scripts/run-mdoc.sh + rm -r /tmp/mdoc-out/ + - name: Jekyll build + run: bundle exec jekyll build + - name: HTMLProofer + run: | + # # Checking for docs.scala-lang/blob/master leads to a chicken and egg problem because of the edit links of new pages. + bundle exec htmlproofer ./_site/\ + --only-4xx\ + --http-status-ignore "400,401,429"\ + --empty-alt-ignore\ + --allow-hash-href\ + --url-ignore '/https://github.com/scala/docs.scala-lang/blob/master/.*/,/www.oracle.com/' + diff --git a/scripts/ci.sh b/scripts/ci.sh deleted file mode 100755 index 5a04734f27..0000000000 --- a/scripts/ci.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -. /usr/local/rvm/scripts/rvm - -set -eux - -bundle install -./scripts/run-mdoc.sh -rm -r /tmp/mdoc-out/ -bundle exec jekyll build - -# Checking for docs.scala-lang/blob/master leads to a chicken and egg problem because of the edit links of new pages. -# The docs at http://dotty.epfl.ch/api/scala/tasty/ are temporarily not available. -bundle exec htmlproofer ./_site/\ - --only-4xx\ - --http-status-ignore "400,401,429"\ - --empty-alt-ignore\ - --allow-hash-href\ - --url-ignore '/https://github.com/scala/docs.scala-lang/blob/master/.*/,/www.oracle.com/' - -exit 0 diff --git a/scripts/run-mdoc.sh b/scripts/run-mdoc.sh index e795f9b4aa..97593abd20 100755 --- a/scripts/run-mdoc.sh +++ b/scripts/run-mdoc.sh @@ -1,10 +1,10 @@ #!/bin/bash set -eux -coursier launch org.scalameta:mdoc_2.12:2.2.13 -- \ +cs launch org.scalameta:mdoc_2.12:2.2.13 -- \ --in . \ --out /tmp/mdoc-out/ \ - --classpath $(coursier fetch -p com.chuusai:shapeless_2.12:2.3.3) \ + --classpath $(cs fetch -p com.chuusai:shapeless_2.12:2.3.3) \ --scalac-options "-Xfatal-warnings -feature" \ --no-link-hygiene \ --include '**.md'