Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clippy: fix cd #1373

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
api-deploy:
# master and prod only, no tags
if: startsWith(github.ref, 'refs/heads/')
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/prod'
name: API Deploy
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -124,6 +124,15 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- uses: actions/setup-node@v3
with:
node-version: "22.x"

- name: Build JS bundle
run: |
npm ci
npx turbo build --filter='@daimo/clippy'

- name: Build, tag, and push docker image to Amazon ECR
uses: docker/build-push-action@v5
with:
Expand Down
10 changes: 2 additions & 8 deletions apps/daimo-clippy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@ FROM node:20
WORKDIR /usr/src/app

# Copy app code
COPY . .

# Install dependencies
RUN npm ci

# Build app
RUN npm run build:clippy
COPY apps/daimo-clippy/dist ./dist

# Expose the port the app runs on
EXPOSE 4200

# Start app
CMD ["npm", "start", "--prefix", "./apps/daimo-clippy"]
CMD ["node", "dist/index.js"]
4 changes: 2 additions & 2 deletions apps/daimo-clippy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "1.0.0",
"main": "src/index.ts",
"scripts": {
"dev": "echo Use 'npm start' for Clippy dev",
"start": "tsx src/index.ts",
"dev": "tsx src/index.ts",
"build": "esbuild --bundle src/index.ts --platform=node --external:readline/promises --outdir=dist",
"lint": "npm run lint:deps && npm run lint:style",
"lint:deps": "npx depcheck --ignores @tsconfig/node20,@types/tape",
"lint:style": "eslint . --max-warnings=0"
Expand Down
4 changes: 2 additions & 2 deletions apps/daimo-mobile/src/view/screen/SettingsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { ClockIcon, PlusIcon } from "../shared/Icons";
import { ScreenHeader } from "../shared/ScreenHeader";
import Spacer from "../shared/Spacer";
import { PendingDot } from "../shared/StatusDot";
import { openSupportTG } from "../shared/error";
import { contactSupport } from "../shared/error";
import {
TextBody,
TextBodyMedium,
Expand Down Expand Up @@ -297,7 +297,7 @@ function DevicesSection({ account }: { account: Account }) {
<ButtonMed
type="subtle"
title={i18.devices.contactSupport.button()}
onPress={openSupportTG}
onPress={contactSupport}
/>
)}

Expand Down
8 changes: 4 additions & 4 deletions apps/daimo-mobile/src/view/shared/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ export function ErrorBanner({
<ButtonBig
type="subtle"
title="Contact Support"
onPress={openSupportTG}
onPress={contactSupport}
/>
</View>
</View>
);
}

export function openSupportTG() {
console.log("[ERROR] Opening Telegram support");
Linking.openURL("https://t.me/daimo_support");
export function contactSupport() {
console.log("[ERROR] Opening email support");
Linking.openURL("mailto:[email protected]");
}

const getStyles = (color: Colorway) =>
Expand Down
4 changes: 2 additions & 2 deletions apps/daimo-mobile/src/view/sheet/DebugBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SendDebugLogButton } from "../../common/useSendDebugLog";
import { i18n } from "../../i18n";
import { ButtonMed } from "../shared/Button";
import Spacer from "../shared/Spacer";
import { openSupportTG } from "../shared/error";
import { contactSupport } from "../shared/error";
import { TextH3, TextLight } from "../shared/text";
import { useTheme } from "../style/theme";

Expand All @@ -23,7 +23,7 @@ export function DebugBottomSheet() {
<ButtonMed
type="primary"
title={i18.helpButton()}
onPress={openSupportTG}
onPress={contactSupport}
/>
<Spacer h={16} />
<SendDebugLogButton />
Expand Down
Loading