diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml new file mode 100644 index 0000000000..7ab7816008 --- /dev/null +++ b/.github/workflows/pr-preview.yml @@ -0,0 +1,58 @@ +name: pr-preview + +on: + pull_request: + branches: + - dev + types: [opened, synchronize, reopened] + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - uses: actions/setup-go@v5 + with: + go-version: ">=1.23.2" + cache: true + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Install dependencies + run: | + bun install --frozen-lockfile + git reset --hard + + - name: Download Go modules + run: go mod download + + - name: TypeScript check + run: cd platform && bun tsc --noEmit + + - name: Build platform + run: ./platform/scripts/build + env: + DOCKER_PUSH: false + + - name: Build CLI + run: go build -o sst ./cmd/sst + + - name: Build docs site + run: | + chmod +x sst + cd www && bun run build \ No newline at end of file