Skip to content

V3 — Update to node current LTS (20.12.2) and core dependencies #247

V3 — Update to node current LTS (20.12.2) and core dependencies

V3 — Update to node current LTS (20.12.2) and core dependencies #247

Workflow file for this run

name: test
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: write # required by guardian/actions-riff-raff
steps:
- uses: actions/checkout@v4
- uses: guardian/[email protected]
with:
private-ssh-keys: ${{ secrets.PRIVATE_INFRASTRUCTURE_CONFIG_DEPLOY_KEY }}
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: npm
- name: build + test
run: |
npm ci
npm run build
npm test -- --passWithNoTests
- name: prep action
run: |
mkdir my-site
cat << EOF > my-site/index.html
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<title>Test</title>
</head>
<body>
<p>Hello, world!</p>
</body>
</html>
EOF
- uses: actions/upload-artifact@v3
with:
path: my-site
- uses: ./
with:
app: the-coolest-static-site
domain: test.devx.gutools.co.uk
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}