From f8d64fa262b947a1b2f5359cf1a886ba6f7d1bdc Mon Sep 17 00:00:00 2001 From: Daniel Sinn Date: Sun, 14 Apr 2024 17:09:38 -0400 Subject: [PATCH] Set up deployment to GitHub Pages --- .github/workflows/ci.yml | 26 ++++++++++++++------------ package.json | 1 + 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3101a1c..e7e4067 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,18 +2,20 @@ on: - pull_request - push jobs: - tests: - name: Tests + ci: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up Node - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - cache: 'npm' - node-version: 16 - - name: Install dependencies - run: npm install - - name: Run tests - run: npm run test + cache: npm + cache-dependency-path: package-lock.json + node-version: 20.x + - run: npm ci + - run: npm test + - run: npm run build + if: github.ref == 'refs/heads/main' + - uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: build + if: github.ref == 'refs/heads/main' diff --git a/package.json b/package.json index d25556c..7de1537 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "ktane-helper", "version": "0.1.0", + "homepage": ".", "private": true, "dependencies": { "prop-types": "^15.8.1",