From d1dd8dfb68b8f8bbbb5887688cf4d257b75a7526 Mon Sep 17 00:00:00 2001 From: Alex Waese-Perlman Date: Mon, 16 Oct 2023 15:24:07 -0400 Subject: [PATCH] set up autodeploy --- .github/workflows/deploy.yml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 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 00000000..22c657cf --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,42 @@ +name: Deploy main +on: + push: + branches: + - main + - staging + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.x' + - run: npm ci + - run: npm run build + - run: mv dist _site + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2