diff --git a/.github/workflows/getFigmaImages.yml b/.github/workflows/getFigmaImages.yml index c80ab496f..1199e7f92 100644 --- a/.github/workflows/getFigmaImages.yml +++ b/.github/workflows/getFigmaImages.yml @@ -35,7 +35,8 @@ 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 commit -m "Update Figma images" || true git push \ No newline at end of file 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..5a0ca45dd 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,13 @@ "scripts": { "start": "gatsby develop", "clean": "gatsby clean", - "build": "gatsby build", + "build": "gatsby build && npm run copy:figma-images", "serve": "gatsby serve", - "build:preview": "gatsby build", + "build:preview": "gatsby build && npm run copy:figma-images", "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/static/images && cp -r content/images/figma public/static/images" }, "dependencies": { "@github/prettier-config": "^0.0.6", diff --git a/src/components/figma-image.tsx b/src/components/figma-image.tsx index fca34fa30..a6ebdda1a 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 = '/static/images/figma'; export const FigmaImage: React.FC = ({src, caption, ...props}) => { // check for missing prop