diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index ade996d..edcbd12 100755 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,15 +7,19 @@ on: jobs: deploy: + permissions: + contents: write + pages: write + id-token: write runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Setup NodeJS - uses: actions/setup-node@v2-beta + - name: Install Node.js + uses: actions/setup-node@v3 with: - node-version: '18' + node-version: 18 - name: Cache dependencies uses: actions/cache@v3 @@ -29,14 +33,22 @@ jobs: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} ${{ runner.os }}-node- - - name: Install Dependencies - run: npm install -g pnpm && pnpm install --no-frozen-lockfile + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 'latest' + run_install: true - name: Build Library and static website run: pnpm run publish && pnpm run publish:offline - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist + # Upload entire repository + path: ./dist + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1