diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7434cf8..2d97dd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,3 +30,36 @@ jobs: - name: Lint & Format run: npm run lint && npm run format:check + + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Setup Node.js + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + node-version: lts/* + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Cache fetched webpack sources + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + with: + path: .cache/webpack + key: webpack-sources-${{ hashFiles('versions.json') }} + + - name: Build site + run: npm run build + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload build output + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: site + path: out + retention-days: 7