From e574a350f5742c77456667b1bc6dd05dc8681236 Mon Sep 17 00:00:00 2001 From: Nigel Breslaw Date: Tue, 26 Dec 2023 22:39:06 +0100 Subject: [PATCH] Action to deploy dashboard --- .github/workflows/deploy-dashboard.yml | 28 ++++++++++++++++++++++++++ .github/workflows/deploy-docs.yml | 2 +- apps/dashboard/src/App.tsx | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy-dashboard.yml diff --git a/.github/workflows/deploy-dashboard.yml b/.github/workflows/deploy-dashboard.yml new file mode 100644 index 000000000..ca0a97e8d --- /dev/null +++ b/.github/workflows/deploy-dashboard.yml @@ -0,0 +1,28 @@ +on: + push: + paths: + - 'apps/dashboard/**' +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + name: Deploy + steps: + - uses: actions/checkout@v4.1.1 + - uses: pnpm/action-setup@v2.4.0 + with: + version: 8.12.1 + - name: install dependencies + run: pnpm install --frozen-lockfile + - name: build + run: cd apps/dashboard && pnpm build + - name: deploy dashboard + uses: cloudflare/pages-action@v1.5.0 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: gg-dashboard + directory: apps/dashboard/dist # e.g. 'dist' + gitHubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 657b13106..b40b0a026 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -19,7 +19,7 @@ jobs: - name: build run: pnpm build - name: publish docs - uses: cloudflare/pages-action@1 + uses: cloudflare/pages-action@v1.5.0 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} diff --git a/apps/dashboard/src/App.tsx b/apps/dashboard/src/App.tsx index 164d53879..3056d481d 100644 --- a/apps/dashboard/src/App.tsx +++ b/apps/dashboard/src/App.tsx @@ -16,7 +16,7 @@ function App() { -

Placeholder for dashboard

+

Placeholder for dashboard!