From 3368b0841548a7d66c05237014954f0b9cf5dccd Mon Sep 17 00:00:00 2001 From: Olling <48805670+Ollie-nl@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:06:22 +0100 Subject: [PATCH 1/2] docs: test in json --- public/data/slides-2024-12.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/data/slides-2024-12.json b/public/data/slides-2024-12.json index 42aef13..833c2a3 100644 --- a/public/data/slides-2024-12.json +++ b/public/data/slides-2024-12.json @@ -2,7 +2,7 @@ "slides": [ { "type": "heading", - "content": "๐Ÿ˜Ž ๐Ÿ˜ฉ ๐ŸŽ„ ๐Ÿพ December", + "content": "๐Ÿ˜Ž ๐Ÿ˜ฉ ๐ŸŽ…๐Ÿผ ๐ŸŽ„ ๐Ÿพ December", "slug": "start" }, { From c336178d59b679cc7e2ce7e2f4f437c6cb9409c3 Mon Sep 17 00:00:00 2001 From: Olling <48805670+Ollie-nl@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:12:54 +0100 Subject: [PATCH 2/2] ci: Update deploy workflow met test en build splitsing --- .github/workflows/deploy.yml | 68 +++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8c7858c..a3df4ca 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,20 +1,14 @@ -name: ๐Ÿš€ Deploy to GitHub Pages - on: push: branches: - - main # Voer de workflow uit bij elke push naar main + - main pull_request: branches: - main -permissions: - contents: write # Vereist om GitHub Pages te deployen - jobs: - build-and-deploy: - runs-on: ubuntu-latest # Draai de pipeline op de nieuwste Ubuntu-versie - + build-and-test: + runs-on: ubuntu-latest steps: - name: ๐Ÿ“ฅ Checkout repository uses: actions/checkout@v3 @@ -22,41 +16,51 @@ jobs: - name: ๐Ÿ—๏ธ Install Node.js uses: actions/setup-node@v3 with: - node-version: "18" # Zorg ervoor dat de Node-versie klopt - cache: "pnpm" # Cache voor pnpm + node-version: "18" + cache: "pnpm" - # Installeer PNPM vรณรณr het installeren van dependencies - name: ๐Ÿ“ฆ Install PNPM - run: npm install -g pnpm # Installeer pnpm globaal + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: ๐Ÿ“ฆ Install dependencies + run: pnpm install + + - name: ๐Ÿงช Run Tests + run: pnpm test + + deploy: + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + needs: build-and-test + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ“ฅ Checkout repository + uses: actions/checkout@v3 + + - name: ๐Ÿ—๏ธ Install Node.js + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "pnpm" - # Cache afhankelijkheden om builds te versnellen - - name: ๐Ÿ“ฆ Cache dependencies - uses: actions/cache@v3 + - name: ๐Ÿ“ฆ Install PNPM + uses: pnpm/action-setup@v2 with: - path: ~/.pnpm-store - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm- + version: 8 - # Installeer afhankelijkheden met PNPM - name: ๐Ÿ“ฆ Install dependencies - run: pnpm install # Gebruik pnpm voor snelle dependency installatie + run: pnpm install - name: ๐Ÿ—‚๏ธ Copy _redirects file - run: cp public/_redirects docs/_redirects - - # Draai tests voor de build (maar faal niet als tests falen) - - name: ๐Ÿงช Run Tests - run: pnpm test + run: cp public/_redirects docs/_redirects || echo "No _redirects found" - # Bouw het project - name: ๐Ÿ”จ Build project run: pnpm run build - # Deploy naar GitHub Pages - name: ๐Ÿš€ Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} # Gebruik de standaard GitHub token - publish_dir: ./docs # Map waarin de build staat na 'mv build docs' - keep_files: true # Behoud bestaande bestanden zoals _redirects + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs + keep_files: true