Skip to content

Added tests/ back as is #616

Added tests/ back as is

Added tests/ back as is #616

Workflow file for this run

name: CI / CD
on:
push:
branches: [main, techradar-ui-improvements]
pull_request:
branches: [main, techradar-ui-improvements]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
# Build
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- run: npm ci
- name: Build production bundle
run: npm run build
- name: Upload dist artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 7
# Publish to GitHub Pages
publish:
name: Publish to GitHub Pages
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
# Download the dist artifact built in the previous job —
# no need to rebuild from scratch
- name: Download dist artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Configure GitHub Pages
uses: actions/configure-pages@v4
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4