{"id":7745750,"name":"casperdcl/push-dir","ecosystem":"actions","description":"Cleanly push directory contents to a branch","homepage":"","licenses":"other","normalized_licenses":["Other"],"repository_url":"https://github.com/casperdcl/push-dir","keywords_array":["actions","deployment","github-actions","github-pages","static-site"],"namespace":"casperdcl","versions_count":3,"first_release_published_at":"2021-09-11T20:54:18.000Z","latest_release_published_at":"2022-10-14T21:04:10.000Z","latest_release_number":"v1.0.2","last_synced_at":"2026-06-08T13:47:46.575Z","created_at":"2023-05-17T10:17:37.856Z","updated_at":"2026-06-08T13:47:46.575Z","registry_url":"https://github.com/casperdcl/push-dir","install_command":null,"documentation_url":null,"metadata":{"name":"Push Dir","author":"Casper da Costa-Luis","description":"Cleanly push directory contents to a branch","inputs":{"message":{"description":"Commit message","required":true},"branch":{"description":"Branch to push to","required":true},"name":{"description":"Git committer name","default":"github-actions[bot]","required":false},"email":{"description":"Git committer email","default":"41898282+github-actions[bot]@users.noreply.github.com","required":false},"dir":{"description":"Directory to push","default":".","required":false},"force":{"description":"Set to \"true\" to force push","required":false},"history":{"description":"Set to \"false\" to discard any prior commits on the `branch`\n(Note: \"false\" will override `force` to \"true\")\n","default":true,"required":false},"cname":{"description":"Text to inject into a `CNAME` file","default":"","required":false},"nojekyll":{"description":"Set to \"true\" to add a `.nojekyll` file","required":false}},"branding":{"icon":"upload-cloud","color":"black"},"runs":{"using":"composite","steps":[{"name":"Push Branch","run":"abspath(){\n  echo \"$(cd \"$1\" \u0026\u0026 pwd)\"\n}\n\nDOT_GIT_DIR=\"$(git -C \"$INPUT_DIR\" rev-parse --git-dir)\"\nif [[ ! -f \"$DOT_GIT_DIR\"/config \u0026\u0026 -d \"$DOT_GIT_DIR\"/.git ]]; then\n  # incorrectly configured GIT_DIR\n  DOT_GIT_DIR=\"$DOT_GIT_DIR\"/.git\nfi\nDOT_GIT_DIR=\"$(abspath \"$DOT_GIT_DIR\")\"\n\nTEMP_DIR=\"$(mktemp -d 2\u003e/dev/null || mktemp -d -t tempdir)\"\ncp -rT \"${INPUT_DIR%%+(/)}\" \"${TEMP_DIR%%+(/)}\"\nrm -rf \"$TEMP_DIR\"/.git\n\nTEMP_REPO=\"$(mktemp -d 2\u003e/dev/null || mktemp -d -t temprepo)\"\npushd \"$TEMP_REPO\"\n\ngit init\ngit config user.name \"$INPUT_NAME\"\ngit config user.email \"$INPUT_EMAIL\"\ngit remote add local file://\"$DOT_GIT_DIR\"\nif [[ \"$INPUT_HISTORY\" == true ]]; then\n  git -C \"$DOT_GIT_DIR\" fetch --depth=1 origin \"$INPUT_BRANCH\":\"$INPUT_BRANCH\" \\\n  \u0026\u0026 git fetch --depth=1 local \"$INPUT_BRANCH\":\"$INPUT_BRANCH\" \\\n  \u0026\u0026 git checkout \"$INPUT_BRANCH\" \\\n  \u0026\u0026 git ls-files -z | xargs -0 git rm || :\nfi\ngit branch -M \"$INPUT_BRANCH\"\n\ncp -rT \"${TEMP_DIR%%+(/)}\" \"${TEMP_REPO%%+(/)}\"\nrm -rf \"$TEMP_DIR\"\n\nif [[ -n \"$INPUT_CNAME\" ]]; then\n  echo \"$INPUT_CNAME\" \u003e CNAME\nfi\nif [[ \"$INPUT_NOJEKYLL\" == true ]]; then\n  touch .nojekyll\nfi\n\ngit add . \u0026\u0026 git commit -m \"${INPUT_MESSAGE}\" || :\ngit push --force local \"$INPUT_BRANCH\":\"$INPUT_BRANCH\"\n\npopd\nrm -rf \"$TEMP_REPO\"\n\nif [[ \"$INPUT_FORCE\" == true || \"$INPUT_HISTORY\" == false ]]; then\n  git -C \"$DOT_GIT_DIR\" push --force origin \"$INPUT_BRANCH\":\"$INPUT_BRANCH\"\nelse\n  git -C \"$DOT_GIT_DIR\" push origin \"$INPUT_BRANCH\":\"$INPUT_BRANCH\"\nfi\n","shell":"bash","env":{"INPUT_DIR":"${{ inputs.dir }}","INPUT_NAME":"${{ inputs.name }}","INPUT_EMAIL":"${{ inputs.email }}","INPUT_HISTORY":"${{ inputs.history }}","INPUT_BRANCH":"${{ inputs.branch }}","INPUT_CNAME":"${{ inputs.cname }}","INPUT_NOJEKYLL":"${{ inputs.nojekyll }}","INPUT_MESSAGE":"${{ inputs.message }}","INPUT_FORCE":"${{ inputs.force }}"}}]},"default_branch":"v1","path":null},"repo_metadata":{"uuid":"405474099","full_name":"casperdcl/push-dir","owner":"casperdcl","description":"Cleanly push directory contents to a branch","archived":false,"fork":false,"pushed_at":"2022-10-14T21:07:33.000Z","size":21,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"v1","last_synced_at":"2023-07-27T06:10:19.725Z","etag":null,"topics":["actions","deployment","github-actions","github-pages","static-site"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casperdcl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"casperdcl","custom":"https://cdcl.ml/sponsor"}},"created_at":"2021-09-11T20:12:47.000Z","updated_at":"2022-12-21T14:02:15.000Z","dependencies_parsed_at":"2023-01-05T05:03:53.206Z","dependency_job_id":null,"html_url":"https://github.com/casperdcl/push-dir","commit_stats":null,"previous_names":[],"tags_count":3,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casperdcl","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":152929156,"owners_count":7127590,"icon_url":"https://github.com/github.png","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"},"owner_record":{"login":"casperdcl","name":"Casper da Costa-Luis","uuid":"10780059","kind":"user","description":"Computational Physicist; @python Software Foundation (@psf) member; GitHub OS @maintainers member; @tqdm primary maintainer\r\n","email":"","website":"https://cdcl.ml","location":"London, UK","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/10780059?u=a2c87a4f44f76f79e0ecfc611b9fba825a527184\u0026v=4","repositories_count":18,"last_synced_at":"2023-02-28T21:10:21.312Z","metadata":{"has_sponsors_listing":true},"html_url":"https://github.com/casperdcl","created_at":"2022-11-11T22:15:37.119Z","updated_at":"2023-02-28T21:10:21.324Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casperdcl","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casperdcl/repositories"},"tags":[{"name":"v1.0.2","sha":"e351785b3b8a4e27e0aa9cb9bbc9d32a74de036c","kind":"commit","published_at":"2022-10-14T21:04:10.000Z","download_url":"https://codeload.github.com/casperdcl/push-dir/tar.gz/v1.0.2","html_url":"https://github.com/casperdcl/push-dir/releases/tag/v1.0.2","dependencies_parsed_at":"2023-06-01T10:55:49.847Z","dependency_job_id":null,"tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir/tags/v1.0.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir/tags/v1.0.2/manifests"},{"name":"v1.0.1","sha":"2ca2c974364d5516760854a1f4cc1e249b688a54","kind":"commit","published_at":"2021-09-19T15:21:47.000Z","download_url":"https://codeload.github.com/casperdcl/push-dir/tar.gz/v1.0.1","html_url":"https://github.com/casperdcl/push-dir/releases/tag/v1.0.1","dependencies_parsed_at":"2023-05-31T10:03:26.273Z","dependency_job_id":null,"tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir/tags/v1.0.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir/tags/v1.0.1/manifests"},{"name":"v1.0.0","sha":"bfc6155c7f5e1aa006c0fd6ceb42f6f934ecb344","kind":"commit","published_at":"2021-09-11T20:54:18.000Z","download_url":"https://codeload.github.com/casperdcl/push-dir/tar.gz/v1.0.0","html_url":"https://github.com/casperdcl/push-dir/releases/tag/v1.0.0","dependencies_parsed_at":"2023-05-31T10:03:26.534Z","dependency_job_id":null,"tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir/tags/v1.0.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fpush-dir/tags/v1.0.0/manifests"}]},"repo_metadata_updated_at":"2023-08-15T15:30:50.002Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":4,"rankings":{"downloads":null,"dependent_repos_count":16.460148946284264,"dependent_packages_count":0.0,"stargazers_count":19.857391855490413,"forks_count":16.162256377753128,"docker_downloads_count":null,"average":13.119949294881952},"purl":"pkg:githubactions/casperdcl/push-dir","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/actions/casperdcl/push-dir","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/actions/casperdcl/push-dir","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/actions/casperdcl/push-dir/dependencies","status":null,"funding_links":["https://github.com/sponsors/casperdcl","https://cdcl.ml/sponsor"],"critical":null,"issue_metadata":null,"versions_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/casperdcl%2Fpush-dir/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/casperdcl%2Fpush-dir/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/casperdcl%2Fpush-dir/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/casperdcl%2Fpush-dir/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/casperdcl%2Fpush-dir/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/casperdcl%2Fpush-dir/codemeta","maintainers":[]}