diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index be31d86..7e4120a 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -6,15 +6,15 @@ on: - main jobs: - build-and-deploy: + build: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.1.7 + uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v4.0.2 + uses: actions/setup-node@v4 with: node-version: '20' @@ -27,12 +27,24 @@ jobs: - name: Build run: npm run build - - name: Deploy to GitHub Pages - uses: Cecilapp/GitHub-Pages-deploy@v3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v3 with: - email: binnette@gmail.com - build_dir: dist - branch: gh-pages - jekyll: no \ No newline at end of file + path: dist + + deploy: + needs: build + runs-on: ubuntu-latest + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4