Merge branch 'monero-project:master' into dockerise-deploy-container #955
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: gh-actions/site | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: [ '3.0.1' ] | |
| name: Ruby ${{ matrix.ruby }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: install bundler | |
| run: gem install bundler:2.2.23 | |
| - name: bundle install | |
| run: bundle install --jobs 4 --retry 3 | |
| - name: build site | |
| run: bundle exec jekyll build --limit-posts 10 | |
| docker-build: | |
| runs-on: ubuntu-22.04 | |
| name: Dockerised Jekyll Build | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Get changed files | |
| id: changes | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| diff_gemfile: | |
| - 'Gemfile.lock' | |
| - name: Build ruby env | |
| run: | | |
| docker build -t monero-site-ruby:latest . | |
| - name: Build Jekyll site with Docker | |
| run: docker run -v $(pwd):/srv/jekyll monero-site-ruby:latest bundle exec jekyll build --limit-posts 10 | |
| - name: Confirm Gemfile update | |
| if: steps.changes.outputs.diff_gemfile == 'true' | |
| run: | | |
| cp Gemfile.lock Gemfile.lock.update | |
| docker run -v $(pwd):/srv/jekyll monero-site-ruby:latest bundle update | |
| if ! diff Gemfile.lock Gemfile.lock.update; then | |
| echo "Gemfile.lock updates do not match" | |
| exit 1 | |
| fi |