Skip to content

Commit 7d57bc3

Browse files
committed
Update versions to latest
This project had got quite behind on its dependencies. In the time since the last update, the GOV.UK tech docs ecosystem now supports relative links properly, so we no longer require gem patches. The Github Pages ecosystem has also matured so the workflow for deploying is now simpler and better supported.
1 parent 7430ffd commit 7d57bc3

File tree

7 files changed

+204
-179
lines changed

7 files changed

+204
-179
lines changed

.github/workflows/update-from-wiki.yml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,36 @@ jobs:
3737
submodules: true
3838
token: ${{ secrets.GITHUB_TOKEN }}
3939

40+
- uses: actions/configure-pages@v5
41+
4042
- name: Set up Ruby
4143
uses: ruby/setup-ruby@v1
4244
with:
43-
ruby-version: 2.6
44-
45-
- name: Restore gems from cache
46-
uses: actions/cache@v2
47-
env:
48-
cache-name: ruby-gems-cache
49-
with:
50-
path: ./.gems
51-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Gemfile.lock') }}
52-
restore-keys: |
53-
${{ runner.os }}-${{ env.cache-name }}-
54-
55-
- name: Install gems
56-
run: bundle install --path=./.gems --jobs=9
45+
ruby-version: '3.4'
46+
bundler-cache: true
5747

5848
- name: Build site
5949
run: bundle exec rake
6050

61-
- name: Deploy to Github Pages
62-
uses: peaceiris/actions-gh-pages@v3
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@v3.0.1
6353
with:
64-
github_token: ${{ secrets.GITHUB_TOKEN }}
65-
publish_dir: build
54+
path: ./build
55+
56+
deploy:
57+
needs: build-static-pages
58+
if: ${{ github.ref == 'refs/heads/main' }}
59+
60+
permissions:
61+
pages: write # to deploy to Pages
62+
id-token: write # to verify the deployment originates from an appropriate source
63+
64+
environment:
65+
name: Github Pages
66+
url: ${{ steps.deployment.outputs.page_url }}
67+
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: Deploy to GitHub Pages
71+
id: deployment
72+
uses: actions/deploy-pages@v4

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source 'https://rubygems.org'
44

55
# For faster file watcher updates on Windows:
6-
gem 'wdm', '~> 0.1.0', platforms: [:mswin, :mingw]
6+
gem 'wdm', platforms: [:mswin, :mingw]
77

88
# Windows does not come with time zone data
99
gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby]

0 commit comments

Comments
 (0)