diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2251e5d..d83d408 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,33 +9,28 @@ jobs: name: yarn install runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20 - - run: npm install -g yarn - - name: Get yarn cache - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: yarn - run: yarn install - run: yarn build - if: github.ref != 'refs/heads/master' - - run: yarn build - if: github.ref == 'refs/heads/master' - env: - CSS_COMMIT: gh-pages - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@releases/v4 - if: github.ref == 'refs/heads/master' + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: public - BASE_BRANCH: master - CLEAN: true + path: public + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4