Skip to content

Use phila-ui Icon component instead of svgs directly #446

Use phila-ui Icon component instead of svgs directly

Use phila-ui Icon component instead of svgs directly #446

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main, test]
jobs:
check:
name: Lint, type-check, build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 2
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v5
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm turbo lint
- name: Format check
run: pnpm turbo format:check
- name: Type-check
run: pnpm turbo type-check
- name: Build
run: pnpm turbo build
detect-changes-test:
name: Detect changed apps (test)
runs-on: ubuntu-latest
needs: check
if: github.ref == 'refs/heads/test' && github.event_name == 'push'
outputs:
oem: ${{ steps.changes.outputs.oem }}
pcf: ${{ steps.changes.outputs.pcf }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 2
- name: Check changed files
id: changes
run: |
CHANGED=$(git diff --name-only HEAD^1 HEAD)
echo "$CHANGED"
packages_changed() { echo "$CHANGED" | grep -q "^packages/"; }
app_changed() { echo "$CHANGED" | grep -q "^apps/$1/"; }
ci_changed() { echo "$CHANGED" | grep -q "^\.github/workflows/ci\.yml$"; }
if packages_changed || app_changed "oem-flood-finder" || ci_changed; then
echo "oem=true" >> $GITHUB_OUTPUT
else
echo "oem=false" >> $GITHUB_OUTPUT
fi
if packages_changed || app_changed "primary-care-finder" || ci_changed; then
echo "pcf=true" >> $GITHUB_OUTPUT
else
echo "pcf=false" >> $GITHUB_OUTPUT
fi
deploy-test-oem-flood-finder:
name: Deploy oem-flood-finder to test
runs-on: ubuntu-latest
needs: detect-changes-test
if: needs.detect-changes-test.outputs.oem == 'true'
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v5
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install city CLI
run: npm install -g @phila/cli
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_TEST_OEM }}
aws-region: us-east-1
- name: Build workspace dependencies
run: pnpm turbo build --filter=@pinboard/oem-flood-finder^...
- name: Deploy to test
working-directory: apps/oem-flood-finder
env:
CI: 'true'
VITE_FLOOD_API_KEY: ${{ secrets.FLOOD_API_KEY_TEST }}
VITE_FLOOD_API_BASE_URL: ${{ secrets.FLOOD_API_BASE_URL_TEST }}
VITE_AIS_URL: ${{ secrets.AIS_URL }}
run: city ship test --web
deploy-test-primary-care-finder:
name: Deploy primary-care-finder to test
runs-on: ubuntu-latest
needs: detect-changes-test
if: needs.detect-changes-test.outputs.pcf == 'true'
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v5
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install city CLI
run: npm install -g @phila/cli
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_TEST_PCF }}
aws-region: us-east-1
- name: Build workspace dependencies
run: pnpm turbo build --filter=@pinboard/primary-care-finder^...
- name: Deploy to test
working-directory: apps/primary-care-finder
env:
CI: 'true'
run: city ship test --web
detect-changes-prod:
name: Detect changed apps (prod)
runs-on: ubuntu-latest
needs: check
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
outputs:
oem: ${{ steps.changes.outputs.oem }}
pcf: ${{ steps.changes.outputs.pcf }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 2
- name: Check changed files
id: changes
run: |
CHANGED=$(git diff --name-only HEAD^1 HEAD)
echo "$CHANGED"
packages_changed() { echo "$CHANGED" | grep -q "^packages/"; }
app_changed() { echo "$CHANGED" | grep -q "^apps/$1/"; }
ci_changed() { echo "$CHANGED" | grep -q "^\.github/workflows/ci\.yml$"; }
if packages_changed || app_changed "oem-flood-finder" || ci_changed; then
echo "oem=true" >> $GITHUB_OUTPUT
else
echo "oem=false" >> $GITHUB_OUTPUT
fi
if packages_changed || app_changed "primary-care-finder" || ci_changed; then
echo "pcf=true" >> $GITHUB_OUTPUT
else
echo "pcf=false" >> $GITHUB_OUTPUT
fi
deploy-prod-oem-flood-finder:
name: Deploy oem-flood-finder to prod
runs-on: ubuntu-latest
needs: detect-changes-prod
if: needs.detect-changes-prod.outputs.oem == 'true'
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v5
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install city CLI
run: npm install -g @phila/cli
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_PROD_OEM }}
aws-region: us-east-1
- name: Build workspace dependencies
run: pnpm turbo build --filter=@pinboard/oem-flood-finder^...
- name: Deploy to prod
working-directory: apps/oem-flood-finder
env:
CI: 'true'
VITE_FLOOD_API_KEY: ${{ secrets.FLOOD_API_KEY_PROD }}
VITE_FLOOD_API_BASE_URL: ${{ secrets.FLOOD_API_BASE_URL_PROD }}
VITE_AIS_URL: ${{ secrets.AIS_URL }}
run: city ship prod --web
deploy-prod-primary-care-finder:
name: Deploy primary-care-finder to prod
runs-on: ubuntu-latest
needs: detect-changes-prod
if: needs.detect-changes-prod.outputs.pcf == 'true'
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v5
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install city CLI
run: npm install -g @phila/cli
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_PROD_PCF }}
aws-region: us-east-1
- name: Build workspace dependencies
run: pnpm turbo build --filter=@pinboard/primary-care-finder^...
- name: Deploy to prod
working-directory: apps/primary-care-finder
env:
CI: 'true'
run: city ship prod --web