diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000000..7a9fa13f60 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,26 @@ +name: Build Docker with theme + +on: + pull_request: + branches: [ master ] + +jobs: + test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + with: + ruby-version: '3.3' + uses: ruby/setup-ruby@v1 + - name: Build with Docker + continue-on-error: true + run: | + cd assets && docker build . + - name: Pull docker images + continue-on-error: true + run: | + docker pull sylhare/type-on-strap + docker pull sylhare/jekyll \ No newline at end of file diff --git a/.github/workflows/gem-build.yml b/.github/workflows/gem-build.yml index 944a0f46db..602e6e6454 100644 --- a/.github/workflows/gem-build.yml +++ b/.github/workflows/gem-build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ '2.7.4', '3.0', '3.1', '3.2' ] + ruby: [ '3.1', '3.2', '3.3' ] steps: - uses: actions/checkout@v4 @@ -21,35 +21,24 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Install github-pages gem 2.7.4 - continue-on-error: true - run: bundle install - working-directory: ./.github/workflows/ruby-2.7.4 - if: matrix.ruby == '2.7.4' - - name: Install github-pages gem - run: | - gem install github-pages - gem update --system - if: matrix.ruby != '2.7.4' - name: Install run: bundle install - name: Build jekyll site run: bundle exec jekyll build + - name: Start Jekyll site + run: timeout 10s bundle exec jekyll serve + continue-on-error: true - name: Build the gem continue-on-error: true run: | gem build *.gemspec echo `find . -name "*.gem" | tail -1 | awk -F"[/]" '{print $2}'` - name: Install theme gems - continue-on-error: true run: | + gem cleanup type-on-strap gem install type-on-strap --source "https://rubygems.org" gem install jekyll-theme-type-on-strap --source "https://rubygems.org" - name: GPR - continue-on-error: true run: | + gem cleanup type-on-strap gem install type-on-strap --version "2.4.10" --source "https://rubygems.pkg.github.com/sylhare" - - name: Build with Docker - continue-on-error: true - run: | - cd assets && docker build . diff --git a/.github/workflows/gem-github-page.yml b/.github/workflows/gem-github-page.yml new file mode 100644 index 0000000000..94f9e9fe79 --- /dev/null +++ b/.github/workflows/gem-github-page.yml @@ -0,0 +1,40 @@ +name: Build theme as GitHub page + +on: + pull_request: + branches: [ master ] + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ '2.7.4', '3.0', '3.3' ] + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, + # change this to (see https://github.com/ruby/setup-ruby#versioning): + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Install github-pages gem 2.7.4 + continue-on-error: true + run: bundle install + working-directory: ./.github/workflows/ruby-2.7.4 + if: matrix.ruby == '2.7.4' + - name: Install github-pages gem + run: | + gem install github-pages + gem update --system + if: matrix.ruby != '2.7.4' + - name: Install + run: bundle install + - name: Build jekyll site + run: bundle exec jekyll build + - name: Start Jekyll site + run: timeout 10s bundle exec jekyll serve + continue-on-error: true diff --git a/.github/workflows/jekyll-build.yml b/.github/workflows/jekyll-build.yml index cf7d69ee10..685663d802 100644 --- a/.github/workflows/jekyll-build.yml +++ b/.github/workflows/jekyll-build.yml @@ -23,7 +23,7 @@ jobs: -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ ${{ matrix.docker-image }}:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future" - - name: Install packages + - name: Pull docker images continue-on-error: true run: | docker pull sylhare/type-on-strap