From bfdc5182ac08e4d697589b3118dcdd14fdb6260a Mon Sep 17 00:00:00 2001 From: eliasnijs Date: Wed, 28 Feb 2024 11:32:08 +0100 Subject: [PATCH] :construction_worker: added build step in ci/cd for deploying to github pages --- .github/workflows/static.yml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index e4c06a7..ac061fd 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -22,8 +22,33 @@ concurrency: cancel-in-progress: false jobs: + + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install and Build + run: | + cd solid-watchparty/ + npm install + npm run build + + - name: Upload Build Artifact + uses: actions/upload-artifact@v3 + with: + name: dist + path: './dist/' + # Single deploy job since we're just deploying deploy: + needs: build environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -31,12 +56,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + + - name: Download Build Artifact + uses: actions/download-artifact@v3 + with: + name: dist + path: './dist/' + - name: Setup Pages uses: actions/configure-pages@v4 + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: './dist' + path: './dist/' + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4