diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..0dd5b8903 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,32 @@ +name: scala-lang docs + +on: + pull_request: + schedule: + - cron: '00 0 * * *' + +jobs: + build-and-validate-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.5.8' + bundler-cache: true + - name: Build documents + run: | + bundle update --bundler + bundle exec jekyll build 2> error.log + cat >&2 error.log + ( ! grep -qie Error -e Warn error.log ) + find ./_site \( -type d \( -name events -o -name training \) -prune -false \) -o \( -type f ! -name error.log -empty \) + find ./_site \( -type d \( -name events -o -name training \) -prune -false \) -o \( -type f ! -name error.log -empty \) | ( ! read ) + - name: Proofing (Pull Request) + if: ${{ github.event_name != 'schedule' }} + run: | + bundle exec htmlproofer ./_site/ --disable-external --only-4xx --empty-alt-ignore --allow-hash-href + - name: Proofing (Cron) + if: ${{ github.event_name == 'schedule' }} + run: | + bundle exec htmlproofer ./_site/ --external_only --only-4xx --http-status-ignore "400,401,429" --empty-alt-ignore --allow-hash-href --url-ignore "/trends.google.com/,/pgp.mit.edu/,/www.oracle.com/" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 42b1c6504..000000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: ruby -rvm: - - 2.5.8 - -cache: bundler - -script: -- bundle update --bundler -- bundle exec jekyll build 2> error.log -- cat >&2 error.log -- ( ! grep -qie Error -e Warn error.log ) -- find ./_site \( -type d \( -name events -o -name training \) -prune -false \) -o \( -type f ! -name error.log -empty \) -- find ./_site \( -type d \( -name events -o -name training \) -prune -false \) -o \( -type f ! -name error.log -empty \) | ( ! read ) -- if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then bundle exec htmlproofer ./_site/ --disable-external --only-4xx --empty-alt-ignore --allow-hash-href ; fi -- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then bundle exec htmlproofer ./_site/ --external_only --only-4xx --http-status-ignore "400,401,429" --empty-alt-ignore --allow-hash-href --url-ignore "/trends.google.com/,/pgp.mit.edu/,/www.oracle.com/" ; fi - -notifications: - email: - - seth.tisue@lightbend.com