From 9e57bcae23cce554e244ce21e9af35eae9c41b00 Mon Sep 17 00:00:00 2001 From: Martin Azpillaga Aldalur Date: Wed, 29 Nov 2023 01:22:10 +0100 Subject: [PATCH] different deployment strategy --- .github/workflows/onpush.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/onpush.yml b/.github/workflows/onpush.yml index 2e94ffc..b100729 100644 --- a/.github/workflows/onpush.yml +++ b/.github/workflows/onpush.yml @@ -2,14 +2,24 @@ name: Build and Deploy to GitHub Pages on: push +permissions: + contents: read + pages: write + id-token: write + jobs: - build: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest - steps: - name: Checkout repository uses: actions/checkout@v2 + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Set up Node.js uses: actions/setup-node@v4 with: @@ -20,10 +30,11 @@ jobs: - name: Test project run: npm test - + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: 'dist' - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@releases/v3 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages - folder: dist + id: deployment + uses: actions/deploy-pages@v2