{"id":17439366,"url":"https://github.com/ocaml-dune/binary-distribution","last_synced_at":"2025-04-18T12:28:15.763Z","repository":{"id":234438882,"uuid":"788899140","full_name":"ocaml-dune/binary-distribution","owner":"ocaml-dune","description":"A web page for dune binary distribution","archived":false,"fork":false,"pushed_at":"2025-04-10T02:41:12.000Z","size":6455,"stargazers_count":3,"open_issues_count":6,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T03:48:24.159Z","etag":null,"topics":["build","dune","ocaml"],"latest_commit_sha":null,"homepage":"https://preview.dune.build/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocaml-dune.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-19T09:58:05.000Z","updated_at":"2025-04-10T02:41:15.000Z","dependencies_parsed_at":"2024-10-27T03:30:57.780Z","dependency_job_id":"5c953e1c-4121-4430-9f72-b3785ca32cfc","html_url":"https://github.com/ocaml-dune/binary-distribution","commit_stats":{"total_commits":201,"total_committers":12,"mean_commits":16.75,"dds":0.6069651741293532,"last_synced_commit":"8d6f6456df7bba64e91d0394cd5e57ac04e81967"},"previous_names":["moyodiallo/moyodiallo.github.io","ocaml-dune/binary-distribution"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-dune%2Fbinary-distribution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-dune%2Fbinary-distribution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-dune%2Fbinary-distribution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-dune%2Fbinary-distribution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocaml-dune","download_url":"https://codeload.github.com/ocaml-dune/binary-distribution/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249493153,"owners_count":21281488,"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":["build","dune","ocaml"],"created_at":"2024-10-17T13:07:10.560Z","updated_at":"2025-04-18T12:28:15.743Z","avatar_url":"https://github.com/ocaml-dune.png","language":"Shell","readme":"# Dune binaries distribution\n\nThis is a webpage for `dune` binaries distribution of `Dune developer Preview`.\nThe page is automatically generated from file `metadata.json`. Apart from the\n_YAML_ part, the code is written in _OCaml_.\n\nThe GitHub Actions pipeline regularly creates commit on the `main` branch where\nit:\n- updates the content of `metadata.json`\n- generates new artifacts and pushes them to their SSH storage using `RClone`\n- publishes the Dockerfile used to deploy the website\n\nThe web page is deployed on [preview.dune.build](https://preview.dune.build).\n\n\u003e :hourglass: The pipeline is triggered every day at _01:00 UTC_.\n\n\u003e [!CAUTION]\n\u003e The _metadata.json_ file must not be modified manually. If you do so, expect some unexpected behaviours.\n\n\n## Installation \u0026 configuration\n\n### Requirement\n\nYou need to have `opam` available to install and build the project.\n\n### Install\n\nThe _OCaml code_ is stored in the repository root directory. Install\nthe dependencies with the following commands:\n\n```sh\n$ opam install . --deps-only --with-dev-setup\n```\n\nPlease note that `--with-dev-setup` should only be used for a development\npurpose.\n\n### Configure\n\nThe configuration is in [bin/config.ml](./bin/config.ml)\nfile. When running in the pipeline, the _sandworm_ binary is generated before\nits execution. As a result, the path taken is the root of this repository. If\nyou want to run it locally, make sure the _files artifacts_ and `rclone.conf`\nare available in the directory where _sandworm_ binary is executed.\n\nThe export relies on an SSH key to the server. If you want to run your own\ntests, you need to have a server available by _SSH_ with an _SSH key_. Then,\nyou have to create a `rclone.conf` file as follows:\n\n```toml\n[dune-binary-distribution]\ntype = sftp\nuser = \u003cusername\u003e\nhost = \u003creplace.myhost.com\u003e\nkey_file = \u003c/path/to/your/ssh/private/key\u003e\nshell_type = unix\n```\n\nIf you don't have a `/dune` directory on your server, you might want to change\nthe `s3_bucket_ref` variable. It could be:\n\n```ocaml\nlet s3_bucket_ref = \"dune-binary-distribution:/path/to/your/server/dir\"\n```\n\n\u003e [!TIP]\n\u003e For our use case, the _RClone_ configuration works with SFTP but, it is\n\u003e compatible with any _RClone_ provider.\n\n## Running\n\nNow your setup is ready, you can execute this list of commands to generate or\nupdate the files:\n\n```sh\n$ ls\nartifacts rclone.conf\n$ dune exec -- sandworm sync --commit [commit hash]\n```\n\n## Running the developement server\n\nTo make the development of the web pages easier, you can use the web server in\ndevelopement mode. It will auto update the page will saving files and,\nregenarate the CSS if needed:\n\n```sh\n$ dune exec --watch sandworm -- serve --dev\n```\n\nYou can then go to [http://localhost:8080/](http://localhost:8080) and see the\nwebsite.\n\nThe flag `--dev` has two actions. To protect the users, it only exposes the\nserver to `localhost` instead of `0.0.0.0`. Also, it injects a script in the\npage to ensure the page is reloaded when you restart the server.\n\n## Deploying\n\n### Deploying on staging environment\n\nIf you need to test your work, you can push on the staging environment. This\nenvironment is available at https://staging-preview.dune.build. If you just need\nto test the website view, you need to reset the HEAD of the `staging` branch\nand push force on it:\n```sh\n $ git switch staging\n $ git reset --hard \u003cmybranch\u003e\n $ git push origin staging --force-with-lease # Ensure nobody is not testing in the same time\n```\nIf you want to test this installation script, go to the [\"binaries\"\nactions](https://github.com/ocaml-dune/binary-distribution/actions/workflows/binary.yaml)\npage and run the `Run workflow` on the `staging` branch. \n\n### Deploying in production\n\nThe deployment are automatically done through GitHub Actions. No need to add\nextra work to deploy it.\n\n## Understand the pipeline\n\nThis schema provides explanations about the workflow used to build the binaries\nand the certificates, and export them to the correct server.\n![pipeline](./docs/pipeline.svg)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml-dune%2Fbinary-distribution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focaml-dune%2Fbinary-distribution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml-dune%2Fbinary-distribution/lists"}