diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index d97d15bc..a7506d06 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -4,18 +4,13 @@ on: push: branches: ['main'] -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: 'pages' - cancel-in-progress: true - jobs: - build: + deploy: runs-on: ubuntu-latest + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -24,16 +19,8 @@ jobs: cache: 'npm' - run: npm ci - run: npm run build - - uses: actions/upload-pages-artifact@v3 + - uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' with: - path: ./dist - - deploy: - needs: build - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - id: deployment - uses: actions/deploy-pages@v4 + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist