From 21bf268c77e775a440504e9a84c048b86e4db367 Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Thu, 2 Sep 2021 11:29:10 +0900 Subject: [PATCH 1/3] Migrate to Github Actions --- .github/workflows/ci.yaml | 31 +++++++++++++++++++++++++++++++ .travis.yml | 19 ------------------- 2 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..87fa7d371 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,31 @@ +name: scala-lang docs + +on: + pull_request: + schedule: + - cron: '00 0 * * *' + +jobs: + foo: + 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 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 From c27d68aebba1a2065c5d6927dff38a528d663634 Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Thu, 2 Sep 2021 11:33:34 +0900 Subject: [PATCH 2/3] Migrate to Github Actions --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 87fa7d371..d4e2d256a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,7 @@ on: - cron: '00 0 * * *' jobs: - foo: + build-and-validate-docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 4e7ce9b406a4c57b8b7ecbe7f29d96414e01af92 Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Tue, 7 Sep 2021 12:38:54 +0900 Subject: [PATCH 3/3] Bring back update command --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d4e2d256a..0dd5b8903 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,6 +16,7 @@ jobs: 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 )