From 990b3605e98069c98ec36f3463fe3fe8eb8d5146 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 22 Jul 2024 14:42:28 -0700 Subject: [PATCH 1/5] update to gh actions page build --- .github/workflows/gh-pages.yml | 63 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + .ruby-version | 1 + Gemfile | 12 ++++++- _config.yml | 1 + 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/gh-pages.yml create mode 100644 .ruby-version diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..7f915837 --- /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@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0 + 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 \ No newline at end of file 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/ From b7c7a1e7bf17b806e6e3810fc99baf21bdfebd20 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 22 Jul 2024 15:21:19 -0700 Subject: [PATCH 2/5] dont use commit to be able to use 3.3.3 --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 7f915837..df9000d6 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby - uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0 + uses: ruby/setup-ruby@1 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 From 346e6597b226a31a417fc83051fbbd0241486bcb Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 22 Jul 2024 16:48:27 -0700 Subject: [PATCH 3/5] pre-commit --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index df9000d6..ff5bd843 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -60,4 +60,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4 From a8996e4799467974c1f41297eda018c3898e3749 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 22 Jul 2024 16:52:22 -0700 Subject: [PATCH 4/5] update other page build action to just use ruby and bundler --- .github/workflows/build-site.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index 2df86035..28eb0f24 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@1 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 From f0bd45361add8fdcbc044049b9fd1290770806a9 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 22 Jul 2024 16:53:27 -0700 Subject: [PATCH 5/5] v1 not 1 --- .github/workflows/build-site.yml | 2 +- .github/workflows/gh-pages.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index 28eb0f24..9c5a27c3 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -23,7 +23,7 @@ jobs: git branch - name: Setup Ruby - uses: ruby/setup-ruby@1 + uses: ruby/setup-ruby@v1 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index ff5bd843..681d47ff 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby - uses: ruby/setup-ruby@1 + 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