Monorepo
Set up Lost Pixel Platform with Monorepo (GitHub Actions)

on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lost_pixel:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- {
package: "apps/web",
name: "Lost Pixel for Web",
command: "pnpm run dev",
}
- {
package: "apps/docs",
name: "Lost Pixel for Docs",
command: "pnpm run dev",
}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7.17.1
- name: Install dependencies
run: pnpm install
- name: Cache Build
uses: actions/cache@v2
with:
path: |
apps/web/.next
apps/docs/.next
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-${{ github.sha }}
- name: Start App
run: cd ${{ matrix.config.package }} && ${{ matrix.config.command }} &
env:
CI: true
- name: ${{ matrix.config.name }}
uses: lost-pixel/[email protected]
env:
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }}
LOST_PIXEL_CONFIG_DIR: ${{ matrix.config.package }}
finalize:
needs: [lost_pixel]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Lost Pixel Finalize
uses: lost-pixel/[email protected]
env:
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }}
LOST_PIXEL_CONFIG_DIR: apps/web
with:
FINALIZE: trueFInalise action
Last updated