name: GitHub Actions on: # Trigger the workflow on push or pull request, # but only for the master branch on Push and any branches on PR push: branches: - master pull_request: branches: - '**' env: CI: true PREFERRED_WORKSPACE_MANAGER: yarn jobs: run: name: Node ${{ matrix.node }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: node: [20] steps: - name: Clone repository uses: actions/checkout@v4 with: fetch-depth: 3 - uses: actions/cache@v4 with: path: ~/.cache/yarn key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-node- - name: Set Node.js version uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - run: node --version - run: npm --version - name: Install npm/yarn dependencies run: yarn install - name: Website Prod Build (GitHub demo site) run: yarn build:demo # always deploy (re-publish) GitHub demo page with a Prod build - name: Deploy to gh-pages uses: peaceiris/actions-gh-pages@v4 if: github.ref == 'refs/heads/master' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs