Skip to content

Commit 622e9e3

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 622e9e3

File tree

7 files changed

+206
-182
lines changed

7 files changed

+206
-182
lines changed

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

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,41 @@ jobs:
3333
- name: Check out repository
3434
uses: actions/checkout@v2
3535
with:
36-
ref: master
36+
ref: ${{ github.ref }}
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.2'
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+
name: Deploy to Pages
58+
needs: build-static-pages
59+
if: ${{ github.ref == 'refs/heads/main' }}
60+
61+
permissions:
62+
pages: write # to deploy to Pages
63+
id-token: write # to verify the deployment originates from an appropriate source
64+
65+
environment:
66+
name: Github Pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
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)