From 7234324b40d3cb35f058a78310c515ce8456094b Mon Sep 17 00:00:00 2001 From: carlos bolanos Date: Thu, 18 Apr 2024 14:19:17 -0700 Subject: [PATCH] create basic github workflows --- .github/workflows/master.yml | 39 + .github/workflows/pr.yml | 19 + .gitmodules | 3 + app/app.css | 0 app/app.test.ts | 5 + app/root.tsx | 7 + app/routes/_index.tsx | 7 +- bun.lockb | Bin 0 -> 391800 bytes package-lock.json | 11998 --------------------------------- package.json | 8 +- packages/phoenix | 1 + tailwind.conf.ts | 10 + 12 files changed, 96 insertions(+), 12001 deletions(-) create mode 100644 .github/workflows/master.yml create mode 100644 .github/workflows/pr.yml create mode 100644 .gitmodules create mode 100644 app/app.css create mode 100644 app/app.test.ts create mode 100755 bun.lockb delete mode 100644 package-lock.json create mode 160000 packages/phoenix create mode 100644 tailwind.conf.ts diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 0000000..864a77b --- /dev/null +++ b/.github/workflows/master.yml @@ -0,0 +1,39 @@ +name: release + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +permissions: {} +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - uses: oven-sh/setup-bun@v1 + - run: bun i + - run: bun test app + + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - uses: oven-sh/setup-bun@v1 + + - run: bun i + + - run: bun run build + + - uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..da8b1e6 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,19 @@ +name: pull request +on: + pull_request: + branches: [main] + types: [labeled, opened, synchronize] + +env: + TITLE: ${{ github.event.pull_request.title }} + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - uses: oven-sh/setup-bun@v1 + - run: bun i + - run: bun test app diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..513667f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "packages/phoenix"] + path = packages/phoenix + url = git@github.com:bolanosdev/phoenix.git diff --git a/app/app.css b/app/app.css new file mode 100644 index 0000000..e69de29 diff --git a/app/app.test.ts b/app/app.test.ts new file mode 100644 index 0000000..69cf027 --- /dev/null +++ b/app/app.test.ts @@ -0,0 +1,5 @@ +import { expect, test } from "bun:test"; + +test("should x and y", () => { + expect(true).toBe(true); +}); diff --git a/app/root.tsx b/app/root.tsx index e82f26f..322b9a1 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -6,6 +6,13 @@ import { ScrollRestoration, } from "@remix-run/react"; +import type { LinksFunction } from "@remix-run/node"; +import baselineStylesHref from "@phoenix-ui/baseline/compiled/baseline.css"; + +export const links: LinksFunction = () => [ + { rel: "stylesheet", href: baselineStylesHref }, +]; + export function Layout({ children }: { children: React.ReactNode }) { return ( diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index 4780ead..4980aed 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -1,4 +1,5 @@ import type { MetaFunction } from "@remix-run/cloudflare"; +import { Text } from "@phoenix-ui/text"; export const meta: MetaFunction = () => { return [ @@ -13,7 +14,9 @@ export const meta: MetaFunction = () => { export default function Index() { return (
-

Welcome to Remix (with Vite and Cloudflare)

+ + Welcome to Remix (with Vite and Cloudflare) +