Skip to content

Commit

Permalink
Adds action to build and deploy to pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mrharpo committed Jan 8, 2024
1 parent 2207f91 commit 9b7618a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 🏭 Build and Deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v4

- name: 🛠️ Install and Build
run: |
npm ci
npm run ci
- name: 🚀 Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"version": "0.1.1",
"description": "Chess on a Launchpad",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "parcel build --no-cache --dist-dir dist src/index.html",
"ci": "parcel build --no-cache --dist-dir build src/index.html",
"dev": "parcel --port 5555 --no-cache --dist-dir dist src/index.html"
},
"browserslist": [
"defaults"
Expand Down

0 comments on commit 9b7618a

Please sign in to comment.