ethanneff/example

View on GitHub
.github/workflows/deploy-to-github-pages.yml

Summary

Maintainability
Test Coverage
name: Deploy Web

on:
  push:
    branches: [master]

jobs:
  deploy-to-github-pages:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Setup node
        uses: actions/setup-node@v3
        with:
          node-version: 20
          cache: 'yarn'

      - name: Install node dependencies
        run: yarn ci-install

      - name: Build web
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: yarn build

      - name: Deploy web
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./build