From 5d3bd0a41f14c9de5c8aa46d5089535dade149ea Mon Sep 17 00:00:00 2001 From: jiajames Date: Mon, 1 Apr 2024 14:22:30 -0400 Subject: [PATCH] add workflows --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..03a21cf0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: Build Slate docs + +on: + push: + branches: [ '*' ] + pull_request: + branches: [ '*' ] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: [2.7.0] + + steps: + - name: Move into slate-docs directory + run: cd slate-docs + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + + - uses: actions/cache@v1 + with: + path: vendor/bundle + key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }} + + # necessary to get ruby 2.3 to work nicely with bundler vendor/bundle cache + # can remove once ruby 2.3 is no longer supported + - run: gem update --system + + - run: bundle config set deployment 'true' + - run: bundle install + + - run: bundle exec middleman build