From 7e604a22fe73dce40a8eaeaeefed0b4ae962f180 Mon Sep 17 00:00:00 2001 From: Mateusz Zych Date: Mon, 12 Feb 2024 15:11:11 +0100 Subject: [PATCH] GitHub Action for deploying the CACAO Roaster and hosting on Github Pages. --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..3c4c606 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +name: Build and Deploy + +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + concurrency: ci-${{github.ref}} + permissions: + id-token: write + pages: write + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure Node + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: Build + run: | + npm ci + npm run build + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + folder: dist + branch: gh-pages \ No newline at end of file