diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index a847470..6963855 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -4,15 +4,25 @@ on: branches: - main +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + + jobs: - deployment: - name: Deploy to GitHub Page + build: + name: Build Page runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v4 with: - node-version: "18" + node-version: "20" - uses: pnpm/action-setup@v4 with: version: 8 @@ -22,10 +32,18 @@ jobs: run: pnpm install - name: Export run: pnpm export - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./out - commit_message: ${{ github.event.head_commit.message }} + path: ./out + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/package.json b/package.json index ac463d9..7e346a5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "next dev", "build": "next build", - "export": "next build && next-sitemap && next export", + "export": "NODE_OPTIONS=--openssl-legacy-providernext build && next-sitemap && next export", "lint": "eslint .", "test": "jest .", "storybook": "start-storybook -p 6006 -s ./public",