Skip to content

Commit

Permalink
[DEV-1274] Add Update Static Content plugin to Strapi to trigger stat…
Browse files Browse the repository at this point in the history
…ic site deployment (#686)
  • Loading branch information
marcobottaro authored Feb 29, 2024
1 parent c981c40 commit ce00c1e
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-pumas-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"strapi-cms": minor
---

Add Update Static Content plugin to Strapi to trigger static site deployment
7 changes: 7 additions & 0 deletions apps/strapi-cms/.env.default
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ AWS_BUCKET_ENDPOINT=
AWS_BUCKET_NAME=
AWS_BUCKET_FULL_URL=
CDN_URL=

# UPDATE STATIC CONTENT PLUGIN
GITHUB_PERSONAL_ACCESS_TOKEN=
REPO_OWNER=
REPO_NAME=
DEPLOY_WEBSITE_WORKFLOW_ID=
DEPLOY_WEBSITE_TARGET_BRANCH=
10 changes: 10 additions & 0 deletions apps/strapi-cms/config/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,14 @@ export default ({ env }: any) => ({
},
},
},
'update-static-content': {
enabled: true,
config: {
githubToken: env('GITHUB_PERSONAL_ACCESS_TOKEN'),
owner: env('REPO_OWNER', 'pagopa'),
repo: env('REPO_NAME', 'developer-portal'),
workflowId: env('DEPLOY_WEBSITE_WORKFLOW_ID', 'deploy_website.yaml'),
branch: env('DEPLOY_WEBSITE_TARGET_BRANCH', 'main'),
},
},
});
1 change: 1 addition & 0 deletions apps/strapi-cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^5.3.4",
"strapi-plugin-update-static-content": "^1.0.8",
"styled-components": "^5.3.11"
},
"devDependencies": {
Expand Down
171 changes: 171 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce00c1e

Please sign in to comment.