diff --git a/.github/workflows/getFigmaImages.yml b/.github/workflows/getFigmaImages.yml index c80ab496f..a4076ad95 100644 --- a/.github/workflows/getFigmaImages.yml +++ b/.github/workflows/getFigmaImages.yml @@ -35,6 +35,7 @@ jobs: run: | git config --global user.name 'Figma Images Action' git config --global user.email 'figmaImagese@users.noreply.github.com' + rm ${{env.ImageUrlFile}} git add -A ${{env.ImageOutputDir}} git commit -m "Update Figma images" git push diff --git a/content/images/figma/GCvY3Qv8czRgZgvl1dG6lp-26998:2424.png b/content/images/figma/GCvY3Qv8czRgZgvl1dG6lp-26998:2424.png new file mode 100644 index 000000000..bf0338a3d Binary files /dev/null and b/content/images/figma/GCvY3Qv8czRgZgvl1dG6lp-26998:2424.png differ diff --git a/package.json b/package.json index 09b5f16a7..0bf9a7ef1 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,13 @@ "scripts": { "start": "gatsby develop", "clean": "gatsby clean", - "build": "gatsby build", + "build": "npm run copy:figma-images && gatsby build", "serve": "gatsby serve", - "build:preview": "gatsby build", + "build:preview": "npm run copy:figma-images && gatsby build", "now-build": "yarn build", "lint": "eslint .", - "markdownlint": "markdownlint-cli2 \"**/*.{md,mdx}\" \"!.github\" \"!node_modules\"" + "markdownlint": "markdownlint-cli2 \"**/*.{md,mdx}\" \"!.github\" \"!node_modules\"", + "copy:figma-images": "mkdir -p public/images && cp -r content/images/figma public/images" }, "dependencies": { "@github/prettier-config": "^0.0.6", diff --git a/src/components/figma-image.tsx b/src/components/figma-image.tsx index fca34fa30..8834a418c 100644 --- a/src/components/figma-image.tsx +++ b/src/components/figma-image.tsx @@ -7,7 +7,7 @@ type FigmaImageProps = React.ImgHTMLAttributes & { caption?: string } -const FigmaImageDir = 'content/images/figma'; +const FigmaImageDir = 'public/images/figma'; export const FigmaImage: React.FC = ({src, caption, ...props}) => { // check for missing prop