diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index 2df86035..9c5a27c3 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -22,20 +22,15 @@ jobs: git fetch origin main --depth 1 git branch - # Use GitHub Actions' cache to shorten build times and decrease load on servers - - name: Use cache to shorten build time - uses: actions/cache@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 with: - path: vendor/bundle - key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-gems- + bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Build Jekyll site - uses: helaili/jekyll-action@v2 - with: - build_only: true - build_dir: _site + - name: Build with Jekyll + run: bundle exec jekyll build + env: + JEKYLL_ENV: production - name: Check links with lychee id: lychee diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..681d47ff --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,63 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: [$default-branch] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll + # Outputs to the './_site' directory by default + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v3 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index 8a632051..349c4060 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ all_contribs.pickle .vale.ini styles/* tmp/* +.bundle diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..619b5376 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.3.3 diff --git a/Gemfile b/Gemfile index a7e2bcff..0cae6398 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,17 @@ source "https://rubygems.org" -gem "github-pages", group: :jekyll_plugins gem "jekyll-include-cache" gem "webrick" gem "html-proofer" gem "ffi", "= 1.16.3" + +gem "jekyll", "~>4.3.3" + +group :jekyll_plugins do + gem "jekyll-paginate", "~> 1.1" + gem "jekyll-sitemap", "~> 1.4" + gem "jekyll-gist", "~> 1.5" + gem "jekyll-feed", "~> 0.17.0" + gem "jemoji", "~> 0.13.0" + gem "jekyll-redirect-from", "~> 0.16.0" +end diff --git a/_config.yml b/_config.yml index b3739bcf..7176b46c 100644 --- a/_config.yml +++ b/_config.yml @@ -217,6 +217,7 @@ kramdown: sass: sass_dir: _sass style: compressed # http://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style + quiet_deps: true # Outputting permalink: /:categories/:title/