Skip to content

Commit

Permalink
Merge pull request #32 from Lilypad-Tech/developersteve/devtestnet
Browse files Browse the repository at this point in the history
CICD workflow updates
  • Loading branch information
developersteve authored Jun 7, 2024
2 parents 18748f3 + e8f01bb commit 44d5c4e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment: devbuild
environment: devnet

steps:
- name: Checkout repository
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy to Cloudflare Pages

on:
push:
branches:
- main # or the branch you want to deploy from

jobs:
build:
runs-on: ubuntu-latest
environment: testnet

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # Use the Node.js version compatible with your project

- name: Install pnpm
run: npm install -g pnpm

- name: Install Doppler CLI
run: |
(curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh || wget -t 3 -qO- https://cli.doppler.com/install.sh) | sudo sh
- name: Set up Doppler
run: doppler configure set token ${{ secrets.DOPPLER_TOKEN }}

- name: Fetch secrets from Doppler and boot
run: doppler run -- npm run boot
env:
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}

- name: Clean up build output
working-directory: ./apps/info-dashboard/.next
run: |
rm -rf cache
- name: Deploy to Cloudflare Pages
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_PROJECT_NAME: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
run: |
npx wrangler pages deploy ./apps/info-dashboard/out --project-name=$CLOUDFLARE_PROJECT_NAME --branch=main

0 comments on commit 44d5c4e

Please sign in to comment.