diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cf1ac1e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + + - name: Install dependencies + run: bundle install + + - name: Build Jekyll site + run: bundle exec jekyll build + + - name: Run HTMLProofer + run: bundle exec htmlproofer ./_site --disable-external + + - name: Upload site artifacts + uses: actions/upload-artifact@v4 + if: success() + with: + name: site + path: _site/ + retention-days: 7 diff --git a/.gitignore b/.gitignore index b6db751..048ca89 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,17 @@ # Reserved hidden directory .*_space +# Jekyll build artifacts +_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata + +# Bundler +vendor/ +.bundle/ +Gemfile.lock + # ========================= # Operating System Files # ========================= diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c0d8009..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: ruby -rvm: -- 2.5.1 - -before_script: - - chmod +x ./script/cibuild - -# Assume bundler is being used, therefore -# the `install` step will run `bundle install` by default. -script: ./script/cibuild - -env: - global: - - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer diff --git a/README.md b/README.md index 02d6f3f..ef04f36 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # cmderdev.github.io The cmder.net page. -[![Build Status](https://travis-ci.org/cmderdev/cmderdev.github.io.svg?branch=master)](https://travis-ci.org/cmderdev/cmderdev.github.io) +[![CI](https://github.com/cmderdev/cmderdev.github.io/actions/workflows/ci.yml/badge.svg)](https://github.com/cmderdev/cmderdev.github.io/actions/workflows/ci.yml) diff --git a/script/cibuild b/script/cibuild old mode 100644 new mode 100755