{"id":13769288,"url":"https://github.com/TimonLukas/action-static-redbean","last_synced_at":"2025-05-11T02:32:03.481Z","repository":{"id":37022945,"uuid":"504916117","full_name":"TimonLukas/action-static-redbean","owner":"TimonLukas","description":"Create a single-file cross-platform server within an executable ZIP, powered by redbean 🦞","archived":false,"fork":false,"pushed_at":"2023-12-05T21:46:49.000Z","size":16,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-12T17:18:25.092Z","etag":null,"topics":["actions","cosmopolitan","cosmopolitan-libc","redbean","server","static"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/create-static-redbean-server","language":null,"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/TimonLukas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-06-18T18:04:13.000Z","updated_at":"2024-03-19T21:00:50.000Z","dependencies_parsed_at":"2024-01-06T20:54:33.114Z","dependency_job_id":null,"html_url":"https://github.com/TimonLukas/action-static-redbean","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"ff7f6adb02a61d7524bf5b960bb45e23e5236572"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimonLukas%2Faction-static-redbean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimonLukas%2Faction-static-redbean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimonLukas%2Faction-static-redbean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimonLukas%2Faction-static-redbean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimonLukas","download_url":"https://codeload.github.com/TimonLukas/action-static-redbean/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225004585,"owners_count":17405644,"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":["actions","cosmopolitan","cosmopolitan-libc","redbean","server","static"],"created_at":"2024-08-03T17:00:21.176Z","updated_at":"2024-11-17T05:30:43.873Z","avatar_url":"https://github.com/TimonLukas.png","language":null,"funding_links":[],"categories":["Redbean"],"sub_categories":["Projects"],"readme":"# Create static server executable - powered by redbean 🦞\n\n[![license badge](https://img.shields.io/github/license/TimonLukas/action-static-redbean)](/LICENSE)\n[![version badge](https://img.shields.io/github/v/release/TimonLukas/action-static-redbean)](https://github.com/TimonLukas/action-static-redbean/releases)\n[![release date badge](https://img.shields.io/github/release-date/TimonLukas/action-static-redbean)](https://github.com/TimonLukas/action-static-redbean/releases)\n[![issues badge](https://img.shields.io/github/issues-raw/TimonLukas/action-static-redbean)](https://github.com/TimonLukas/action-static-redbean/issues)\n\nThis GitHub action creates a single-file server that:\n* runs anywhere (see [jart/cosmopolitan](https://github.com/jart/cosmopolitan))\n* serves static files (with optional fallback)\n* is extensible through an extensive [scripting interface](https://redbean.dev/#lua)\n\n## Usage\n```yaml\n- uses: TimonLukas/action-static-redbean@v1\n  with:\n    # specifies version to be fetched from redbean.dev\n    version: \"latest\"\n    # Location of the finished executable\n    executable-name: \"redbean.com\"\n    # Location of static files to include\n    input: \"dist\"\n    # Fallback file (for history API-based routing), `false` to disable\n    fallback: \"index.html\"\n    # On launch, open the users preferred browser pointing to this path, `false` to disable\n    launch: \"/\"\n    # Cache redbean executable instead of fetching every time, `false` to disable\n    cache: true\n\n# Example: static server for `./build/*` without fallback using redbean version x.y.z\n- uses: TimonLukas/action-static-redbean@v1\n  with:\n    version: \"x.y.z\"\n    input: \"build\"\n    fallback: false\n- run: mv ./redbean.com $FOO\n```\n\n## Extending behavior\nGenerally, anything beyond serving files statically can be approached using the LUA api. The fallback option itself is actually implemented as:\n\n```lua\nfunction OnHttpRequest()\n    if not RoutePath() then\n        ServeAsset('$FALLBACK')\n    end\nend\n```\n\nTo add any behavior, add `.init.lua` with your own content into your `input` directory.\nDepending on your project it might be worth to look into frameworks for redbean like [`fullmoon`](https://github.com/pkulchenko/fullmoon).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTimonLukas%2Faction-static-redbean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTimonLukas%2Faction-static-redbean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTimonLukas%2Faction-static-redbean/lists"}