From e2962f723f988280206e863949a021d597c1e1aa Mon Sep 17 00:00:00 2001 From: Gloria Giannascoli Date: Mon, 29 Jul 2024 13:52:16 +0200 Subject: [PATCH] . --- .github/workflows/build-and-deploy.yml | 28 ++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 3466bec..d5740a1 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -5,7 +5,7 @@ on: branches: [main] jobs: - build-and-deploy: + build: runs-on: ubuntu-latest steps: @@ -27,15 +27,27 @@ jobs: - run: npm install - - run: npm ci - - run: npm run build-ci env: VITE_PUBLIC_PATH: '/online-menu' CI: false - - name: Deploy 🚀 - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{secrets.GITHUB_TOKEN}} - publish_dir: ./dist \ No newline at end of file + deploy: + runs-on: ubuntu-latest + # Add a dependency to the build job + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file