Skip to content

Commit 01da806

Browse files
Figma Images Actionlukasoppermann
Figma Images Action
authored andcommitted
Update Figma images
1 parent cc66e40 commit 01da806

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/getFigmaImages.yml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
run: |
3636
git config --global user.name 'Figma Images Action'
3737
git config --global user.email '[email protected]'
38+
rm ${{env.ImageUrlFile}}
3839
git add -A ${{env.ImageOutputDir}}
3940
git commit -m "Update Figma images"
4041
git push
Loading

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
"scripts": {
66
"start": "gatsby develop",
77
"clean": "gatsby clean",
8-
"build": "gatsby build",
8+
"build": "npm run copy:figma-images && gatsby build",
99
"serve": "gatsby serve",
10-
"build:preview": "gatsby build",
10+
"build:preview": "npm run copy:figma-images && gatsby build",
1111
"now-build": "yarn build",
1212
"lint": "eslint .",
13-
"markdownlint": "markdownlint-cli2 \"**/*.{md,mdx}\" \"!.github\" \"!node_modules\""
13+
"markdownlint": "markdownlint-cli2 \"**/*.{md,mdx}\" \"!.github\" \"!node_modules\"",
14+
"copy:figma-images": "mkdir -p public/images && cp -r content/images/figma public/images"
1415
},
1516
"dependencies": {
1617
"@github/prettier-config": "^0.0.6",

src/components/figma-image.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type FigmaImageProps = React.ImgHTMLAttributes<HTMLImageElement> & {
77
caption?: string
88
}
99

10-
const FigmaImageDir = 'content/images/figma';
10+
const FigmaImageDir = 'public/images/figma';
1111

1212
export const FigmaImage: React.FC<FigmaImageProps> = ({src, caption, ...props}) => {
1313
// check for missing prop

0 commit comments

Comments
 (0)