diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..0be7498 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/package.json b/package.json index fe491e9..b68e5cd 100644 --- a/package.json +++ b/package.json @@ -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"