diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 912feca..334a810 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,13 +11,10 @@ on: jobs: build: - runs-on: ubuntu-latest - strategy: matrix: node-version: [22.x] - steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} @@ -29,8 +26,22 @@ jobs: - run: npm test - run: npm run build --if-present - run: npm run deploy - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./artifact + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: 'artifact' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4