From c0f9bd55cf863a5f0a4621862c2768f12b761691 Mon Sep 17 00:00:00 2001 From: Tayla Phillips <76406423+tednaphil@users.noreply.github.com> Date: Wed, 8 May 2024 21:31:28 -0500 Subject: [PATCH] Update deploy job --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b26a138..97745d7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: environment: Test steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 # Install NPM dependencies, cache them correctly # and run all Cypress tests - name: Cypress run @@ -25,18 +25,36 @@ jobs: with: build: npm run build start: npm start - deploy-run: + deploy: runs-on: ubuntu-latest needs: cypress-run permissions: + contents: write pages: write id-token: write environment: name: github-pages url: ${{steps.deployment.outputs.page_url}} steps: - # - name: Checkout - # uses: actions/checkout@v3 - - name: Deploy to GitHub Pages + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: use node.js + uses: actions/setup-node@v3 + with: + node-version: '18.x' + - name: configure github pages + uses: actions/configure-pages@v3 + with: + static_site_generator: next + - run: npm install + - run: npm run build + - name: upload artifacts + uses: actions/upload-pages-artifact@v1 + with: + path: "./out" + - name: deploy id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v1 +