{"id":13472529,"url":"https://github.com/phantomstudios/strapi-plugin-github-publish","last_synced_at":"2025-03-26T17:30:44.439Z","repository":{"id":37035095,"uuid":"352119752","full_name":"phantomstudios/strapi-plugin-github-publish","owner":"phantomstudios","description":"This is a plugin for Strapi headless CMS. It lets you trigger a GitHub Action workflow when the site is ready to be published.","archived":false,"fork":false,"pushed_at":"2023-08-31T17:14:44.000Z","size":392,"stargazers_count":39,"open_issues_count":12,"forks_count":16,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-01T16:30:34.514Z","etag":null,"topics":["github","github-actions","publishing","strapi","strapi-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phantomstudios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-03-27T16:21:27.000Z","updated_at":"2024-04-25T09:11:02.000Z","dependencies_parsed_at":"2023-02-08T03:31:23.443Z","dependency_job_id":null,"html_url":"https://github.com/phantomstudios/strapi-plugin-github-publish","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phantomstudios%2Fstrapi-plugin-github-publish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phantomstudios%2Fstrapi-plugin-github-publish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phantomstudios%2Fstrapi-plugin-github-publish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phantomstudios%2Fstrapi-plugin-github-publish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phantomstudios","download_url":"https://codeload.github.com/phantomstudios/strapi-plugin-github-publish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222156475,"owners_count":16940436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","github-actions","publishing","strapi","strapi-plugin"],"created_at":"2024-07-31T16:00:55.458Z","updated_at":"2024-10-30T03:30:18.697Z","avatar_url":"https://github.com/phantomstudios.png","language":"JavaScript","readme":"# Strapi plugin github-publish\n\n[![NPM version][npm-image]][npm-url]\n[![Actions Status][ci-image]][ci-url]\n[![PR Welcome][npm-downloads-image]][npm-downloads-url]\n\nThis is a plugin for [Strapi](https://github.com/strapi/strapi) headless CMS. It lets you trigger a GitHub Action workflow when the site is ready to be published.\n\n## Introduction\n\n![Screenshot](./docs/screenshot.png \"Plugin Screenshot\")\n\nWhen using Strapi as a headless CMS for a statically built website you need a way to trigger the site to rebuild when content has been updated. The typical approach is to setup a Strapi managed webhook to trigger a CI/CD pipeline whenever content changes. This approach has it's issues. For example when making many changes to content, builds are triggered multiple times and deployments can fail due to the site being deployed concurrently.\n\nThis plugin tackles the publishing flow a different way. The site administrators can take their time and make many changes and once the content update is complete they can trigger a single build.\n\nThis plugin also checks to see if an `in_progress` build is active or if anything is in the `queue` and not allow the user to trigger another. Also, when a build has been triggered the user can wait on the plugin page to see when the build and deployment has completed.\n\n## Installation\n\nInstall this plugin with npm or yarn.\n\nWith npm:\n\n```bash\nnpm install strapi-plugin-github-publish\n```\n\nWith yarn:\n\n```bash\nyarn add strapi-plugin-github-publish\n```\n\n## Configuration\n\nGenerate a config file at `config/plugins.js` or `config/development/plugins.js` etc...\n\n```javascript\nmodule.exports = ({ env }) =\u003e ({\n  \"github-publish\": {\n    enabled: true,\n    config: {\n      owner: \"username\", // The GitHub organisation or user\n      repo: \"reponame\", // The name of the repository\n      workflow_id: \"rebuild.yml\", // The workflow_id or filename\n      token: env(\"GITHUB_TOKEN\"), // The GitHub personal access token with access to trigger workflows and view build status\n      branch: \"master\", // The branch the workflow should be triggered on\n      inputs: {\n        // Optional inputs to pass through to the GitHub workflow\n        some_input: \"Some value\",\n        some_other_input: \"Some other value\",\n      },\n    },\n  },\n});\n```\n\nMake sure you have variable in your .env file\n\n```bash\nGITHUB_TOKEN=XXXXXXX\n```\n\n## Use the Plugin\n\nWhen the plugin has been installed correctly just click on `GitHub Publishing` in the sidebar under plugins then click \"Publish\".\n\n## Older Strapi versions\n\nTo use this plugin on a Strapi version prior to v4, install using:\n\n```bash\nnpm install strapi-plugin-github-publish@0.1.0\n```\n\nThen generate a config file at `config/plugins.js` or `config/development/plugins.js` etc... with:\n\n```javascript\nmodule.exports = ({ env }) =\u003e ({\n  \"github-publish\": {\n    owner: \"username\", // The GitHub organisation or user\n    repo: \"reponame\", // The name of the repository\n    workflow_id: \"rebuild.yml\", // The workflow_id or filename\n    token: env(\"GITHUB_TOKEN\"), // The GitHub personal access token with access to trigger workflows and view build status\n    branch: \"master\", // The branch the workflow should be triggered on\n    inputs: {\n      // Optional inputs to pass through to the GitHub workflow\n      some_input: \"Some value\",\n      some_other_input: \"Some other value\",\n    },\n  },\n});\n```\n\n[npm-image]: https://img.shields.io/npm/v/strapi-plugin-github-publish.svg?style=flat-square\u0026logo=react\n[npm-url]: https://npmjs.org/package/strapi-plugin-github-publish\n[npm-downloads-image]: https://img.shields.io/npm/dm/strapi-plugin-github-publish.svg\n[npm-downloads-url]: https://npmcharts.com/compare/strapi-plugin-github-publish?minimal=true\n[ci-image]: https://github.com/phantomstudios/strapi-plugin-github-publish/workflows/Test/badge.svg\n[ci-url]: https://github.com/phantomstudios/strapi-plugin-github-publish/actions\n","funding_links":[],"categories":["Strapi v3"],"sub_categories":["Plugin \u0026 Providers - v3"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphantomstudios%2Fstrapi-plugin-github-publish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphantomstudios%2Fstrapi-plugin-github-publish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphantomstudios%2Fstrapi-plugin-github-publish/lists"}