From 9cb208ef2f574e3eaf6f39b9c7d412f977035da0 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Tue, 24 Sep 2024 10:32:11 -0500 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 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 0000000000..a057779322 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,53 @@ +name: CICD + +on: + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + deploy: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + defaults: + run: + working-directory: ./app + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "19.x" + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.npm + key: npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + npm- + + - name: Install dependencies + run: npm ci --prefer-offline --no-audit + + - name: Build project + run: npm run build + + - name: Setup GitHub pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: app/dist + + - name: Deploy to GitHub pages + uses: actions/deploy-pages@v4 +