Skip to content

Commit 48d4c07

Browse files
authored
Merge branch 'main' into guilhemf/accessibility/icons-contrast
2 parents 02ee9cd + 75ccfab commit 48d4c07

58 files changed

Lines changed: 2820 additions & 5074 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJECT_ID=__PROJECT_ID__

.github/workflows/actionlint.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lint GitHub Actions
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
paths: ['.github/**']
7+
jobs:
8+
actionlint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
show-progress: false
14+
- uses: alphagov/govuk-infrastructure/.github/actions/actionlint@main

.github/workflows/check-code-hygiene.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Code Hygiene
2-
2+
permissions:
3+
contents: read
34
on:
45
pull_request:
56
branches:
@@ -12,18 +13,18 @@ jobs:
1213

1314
steps:
1415
- name: Checkout code
15-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1617

1718
- name: Cache Node.js modules
18-
uses: actions/cache@v2
19+
uses: actions/cache@v4
1920
with:
2021
path: ~/.npm
2122
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2223
restore-keys: |
2324
${{ runner.os }}-node-
2425
2526
- name: Setup Node.js
26-
uses: actions/setup-node@v2
27+
uses: actions/setup-node@v4
2728
with:
2829
node-version: 16
2930

.github/workflows/check-test-coverage.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Jest Coverage Check
2-
32
on:
43
push:
54
branches: [main]
@@ -11,17 +10,21 @@ jobs:
1110
name: Jest Test with Coverage Check
1211
runs-on: ubuntu-latest
1312

13+
permissions:
14+
contents: read
15+
actions: write
16+
1417
steps:
1518
- name: Check out code
16-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
1720

1821
- name: Setup Node.js
19-
uses: actions/setup-node@v2
22+
uses: actions/setup-node@v4
2023
with:
2124
node-version: 16
2225

2326
- name: Cache Node.js modules
24-
uses: actions/cache@v2
27+
uses: actions/cache@v4
2528
with:
2629
path: ~/.npm
2730
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -35,7 +38,7 @@ jobs:
3538
run: npm run test-ci
3639

3740
- name: Upload coverage to GitHub
38-
uses: actions/upload-artifact@v2
41+
uses: actions/upload-artifact@v4
3942
with:
4043
name: coverage-${{ github.event.pull_request.number }}
4144
path: coverage/coverage-${{ github.event.pull_request.number }}.json

.github/workflows/production-create-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
env:
1717
commitmsg: ${{ github.event.head_commit.message }}
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- name: Create Tag Name
2222
run: |
2323
GIT_TAG=$(date +v%Y.%m.%d)-$(git log --format=%h -1)
24-
echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV
24+
echo "GIT_TAG=$GIT_TAG" >> "$GITHUB_ENV"
2525
2626
- name: Create Release
2727
id: create_release

.github/workflows/production-deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Deploy Production
2-
2+
permissions:
3+
contents: read
34
on:
45
workflow_dispatch:
56
inputs:
@@ -15,7 +16,7 @@ jobs:
1516

1617
steps:
1718
- name: Checkout code
18-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
1920
with:
2021
ref: ${{ github.event.inputs.tag }}
2122

.github/workflows/staging-deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Deploy Staging
2-
2+
permissions:
3+
contents: read
34
on:
45
workflow_dispatch:
56
push:
@@ -20,7 +21,7 @@ jobs:
2021
environment: staging
2122
steps:
2223
- name: Checkout code
23-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
2425

2526
- name: Install Dependencies
2627
run: npm ci

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ cypress/screenshots
88
coverage
99
.sass-cache
1010
dist
11-
public
11+
public
12+
.env

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Docs](https://docs.data-community.publishing.service.gov.uk).
1515

1616
- Clone this repository
1717
- Run `npm install` to install all dependencies
18+
- Run `npm run build`
1819
- Install [Sass](https://sass-lang.com/install) and compile the Sass sources to CSS with `sass ./src/frontend/scss/main.scss > ./public/main.css`
1920

2021
- Install [webpack](https://webpack.js.org/) and compile the browser-side Typescript code to JavaScript by just running `webpack`
@@ -32,7 +33,7 @@ Docs](https://docs.data-community.publishing.service.gov.uk).
3233

3334
- Start the server with `npm run dev`.
3435

35-
- Point your browser to `https://localhost:8080` (the port can be changed using the `PORT` environment variable)
36+
- Point your browser to `http://localhost:8080` (the port can be changed using the `PORT` environment variable)
3637

3738
# Developing
3839

@@ -86,6 +87,8 @@ To run a single test file , use `--spec`. For instance:
8687

8788
### Staging Deployment
8889

90+
The staging environment can be accessed here: https://govgraphsearchstaging.dev/
91+
8992
Staging deployment is triggered automatically whenever a pull request is merged into the main branch.
9093

9194
This is made possible by the deploy-staging GitHub Action.
@@ -120,7 +123,7 @@ Production deployments have to be triggered manually for security reasons.
120123

121124
## Deployment Steps
122125

123-
1. Go to production site https://govgraphsearch.dev/ and view the source.
126+
1. Go to production site https://gov-search.service.gov.uk/ and view the source.
124127
2. Look for the line beginning `<!-- Google Tag Manager (noscript) --><noscript><iframe src="https://www.googletagmanager.com/ns.html?` and note the values of the URL parameters `id` and `gtm_auth`. They look like `GTM-XXXXXXX` and `aWEg5ABBXXXXXXXXXXXXXXXXX`.
125128
3. Run the script `deploy-to-gcp.sh` located at the root directory
126129
4. Enter the value of `id` as in step 2 as the GTM tracking ID.
@@ -183,3 +186,7 @@ log.error(error, 'error')
183186
// If you want to log an object:
184187
log.info({ a: 123, b: 456 }, 'This is a log')
185188
```
189+
190+
# Web analytics
191+
192+
Some of the activity of users who consent to a tracking cookie can be viewed in a [GA4 dashboard](https://analytics.google.com/analytics/web/?authuser=0#/p303522524/reports/intelligenthome).

0 commit comments

Comments
 (0)