Skip to content

Commit 25ea878

Browse files
authored
Merge pull request #302 from alphagov/main
Merge main into production for deployment
2 parents fdaa53c + 0be4362 commit 25ea878

14 files changed

Lines changed: 778 additions & 3003 deletions

.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: 7 additions & 4 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') }}

.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

README.md

Lines changed: 3 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

@@ -120,7 +121,7 @@ Production deployments have to be triggered manually for security reasons.
120121

121122
## Deployment Steps
122123

123-
1. Go to production site https://govgraphsearch.dev/ and view the source.
124+
1. Go to production site https://gov-search.service.gov.uk/ and view the source.
124125
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`.
125126
3. Run the script `deploy-to-gcp.sh` located at the root directory
126127
4. Enter the value of `id` as in step 2 as the GTM tracking ID.

0 commit comments

Comments
 (0)