diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 7a9fa13f60..78e7c6609b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,24 +1,31 @@ -name: Build Docker with theme +name: Build with Docker on: + push: + branches: [ master ] pull_request: branches: [ master ] jobs: - test: + image: runs-on: ubuntu-latest + strategy: + matrix: + # The jekyll/builder is used by GitHub pages + docker-image: [ 'jekyll/builder', 'sylhare/jekyll' ] 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: Build the site in the container + run: | + docker run \ + -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: Pull docker images continue-on-error: true run: | diff --git a/.github/workflows/gem-build.yml b/.github/workflows/gem-build.yml index 602e6e6454..c10fd4fcc4 100644 --- a/.github/workflows/gem-build.yml +++ b/.github/workflows/gem-build.yml @@ -1,11 +1,11 @@ -name: Build Ruby Gem +name: Type-on-strap CI on: pull_request: branches: [ master ] jobs: - test: + ruby: runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/gem-github-page.yml b/.github/workflows/gem-github-page.yml index 94f9e9fe79..7d2297d556 100644 --- a/.github/workflows/gem-github-page.yml +++ b/.github/workflows/gem-github-page.yml @@ -1,11 +1,11 @@ -name: Build theme as GitHub page +name: Type-on-strap CI (GitHub Pages) on: pull_request: branches: [ master ] jobs: - test: + ruby: runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/jekyll-build.yml b/.github/workflows/jekyll-build.yml deleted file mode 100644 index 685663d802..0000000000 --- a/.github/workflows/jekyll-build.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Jekyll Build - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - # Do not change as jekyll/builder is used by GitHub pages (for compatibility) - docker-image: [ 'jekyll/builder', 'sylhare/jekyll' ] - - steps: - - uses: actions/checkout@v4 - - name: Build the site in the container - run: | - docker run \ - -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: Pull docker images - continue-on-error: true - run: | - docker pull sylhare/type-on-strap - docker pull sylhare/jekyll - diff --git a/.github/workflows/publish-build.yml b/.github/workflows/publish-build.yml index 889b7534cf..23c7cf0126 100644 --- a/.github/workflows/publish-build.yml +++ b/.github/workflows/publish-build.yml @@ -22,10 +22,7 @@ jobs: ruby-version: 3.1.0 - name: Install run: bundle install - - name: Build jekyll site - run: bundle exec jekyll build - name: Build the gem - continue-on-error: true run: | gem build *.gemspec echo `find . -name "*.gem" | tail -1 | awk -F"[/]" '{print $2}'` diff --git a/assets/Dockerfile b/assets/Dockerfile index d8822c5a4b..c83220ae89 100644 --- a/assets/Dockerfile +++ b/assets/Dockerfile @@ -5,9 +5,11 @@ LABEL image="sylhare/type-on-strap" # Create Type-on-strap Gemfile RUN echo "source \"https://rubygems.org\"" >> Gemfile RUN echo "gem 'type-on-strap', '>= 2.4.10', '< 3.0'" >> Gemfile -RUN echo "Adding the Gemfile" >> cat Gemfile +RUN echo "Adding the Gemfile" +RUN cat Gemfile # Install the theme +RUN bundle update RUN bundle install # Make it accessible from outside