diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 4085e4a55..36c2c2c46 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -3,15 +3,14 @@ name: GitHub Pages on: push: branches: - - main + - $default-branch + workflow_dispatch: env: - FORCE_COLOR: 2 - NODE_VERSION: 16 - NPM_VERSION: 8 + NODE_VERSION: 18 jobs: - deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -20,8 +19,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} - - name: Update npm - run: npm i -g npm@${{ env.NPM_VERSION }} - uses: actions/cache@v3 with: path: ~/.npm @@ -38,9 +35,22 @@ jobs: run: npm run build:docs env: BASE_URL: /design-system/ - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@releases/v3 + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: public + path: public + deploy: + runs-on: ubuntu-latest + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy 🚀 + id: deployment + uses: actions/deploy-pages@v2