2024-01-24 18:39:50 +01:00
|
|
|
name: CI/CD
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- gh-pages
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
ci-cd:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-01-24 18:48:18 +01:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
node-version: 20
|
|
|
|
|
|
|
|
- name: Set up Node.js
|
|
|
|
uses: actions/setup-node@v3
|
2024-01-24 18:39:50 +01:00
|
|
|
with:
|
|
|
|
node-version: 20
|
|
|
|
registry-url: https://registry.npmjs.org/
|
|
|
|
cache: npm
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Build and test
|
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
run: npm run deploy -- -m "Update GitHub Pages"
|