Skip to content

Commit

Permalink
hotfix: gatsby-plugin-s3 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
owl1753 committed Feb 28, 2025
1 parent cefe729 commit 9aefb8b
Show file tree
Hide file tree
Showing 4 changed files with 1,262 additions and 12 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ jobs:
- name: build application
run: ./node_modules/.bin/gatsby build

- name: Deploy to s3
- name: Deploy to S3 using gatsby-plugin-s3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 cp \
--recursive \
--region ap-northeast-2 \
public s3://yourssu.com
AWS_REGION: ap-northeast-2
run: ./node_modules/.bin/gatsby-plugin-s3 deploy --yes
7 changes: 7 additions & 0 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ const config: GatsbyConfig = {
queries: myCustomQueries,
},
},
{
resolve: 'gatsby-plugin-s3',
options: {
bucketName: 'yourssu.com',
region: 'ap-northeast-2',
},
},
],
jsxRuntime: 'automatic',
};
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"build": "gatsby build",
"serve": "gatsby serve",
"clean": "gatsby clean",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"deploy": "gatsby-plugin-s3 deploy"
},
"engines": {
"node": ">=18.0.0"
Expand All @@ -26,6 +27,7 @@
"gatsby-plugin-image": "^3.13.1",
"gatsby-plugin-manifest": "^5.13.0",
"gatsby-plugin-react-svg": "^3.3.0",
"gatsby-plugin-s3": "^0.4.1",
"gatsby-plugin-sharp": "^5.13.1",
"gatsby-source-filesystem": "^5.13.0",
"gatsby-source-sanity": "^7.9.1",
Expand Down
Loading

0 comments on commit 9aefb8b

Please sign in to comment.