Skip to content

Commit ae60f1b

Browse files
authored
No code blocks w/o language (#3181)
* No code blocks w/o language * Linting
1 parent 5c07ec2 commit ae60f1b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

HACKING.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Before starting to hack, you need a properly configured development environment.
1313

1414
The project [`Dockerfile`](./Dockerfile) contains up-to-date system configuration instructions, as used to ship into production. It is written for the Alpine Linux distribution, but it is meant to be adapted to other environments such as Ubuntu, macOS+Homebrew, or others. The GitHub workflow file [`.github/workflows/ci.yml`](.github/workflows/ci.yml) also contains useful commands for Ubuntu and macOS. Since OCaml.org is mostly written in OCaml, a properly configured OCaml development environment is also required, but is not detailed here. Although Docker is used to ship, it is not a requirement to begin hacking. Currently, OCaml.org doesn't yet compile using OCaml 5; version 4.14 of the language is used. It is possible to run workflow files in `.github/workflows` using the [`nektos/act`](https://github.com/nektos/act) tool. For instance, the following command runs the CI checks through GitHub on each pull request (where `ghghgh` is replace by an _ad-hoc_ GitHub token, see: <https://github.com/nektos/act#github_token>)
1515

16-
```
16+
```bash
1717
act -s GITHUB_TOKEN=ghghgh .github/workflows/ci.yml -j build
1818
```
1919

2020
The Makefile contains many commands that can get you up and running. A typical workflow is to clone the repository after forking it.
2121

22-
```
22+
```bash
2323
git clone https://github.com/<username>/OCaml.org.git
2424
cd OCaml.org
2525
```
@@ -30,13 +30,13 @@ With opam installed, you can now initialise opam with `opam init`. Note that in
3030

3131
Finally from the root of your project, you can setup a [local opam switch](https://opam.OCaml.org/doc/Manual.html#Switches) and install the dependencies. There is a single `make` target to do just that.
3232

33-
```
33+
```bash
3434
make switch
3535
```
3636

3737
If you don't want a local opam switch and are happy to install everything globally (in the opam sense), then you can just install the dependencies directly.
3838

39-
```
39+
```bash
4040
make deps
4141
```
4242

@@ -82,13 +82,13 @@ You can build the playground from the root of the project. There is no need to m
8282

8383
To regenerate the playground, you need to install the playground's dependencies first:
8484

85-
```
85+
```bash
8686
make deps -C playground
8787
```
8888

8989
After the dependencies have been installed, simply build the project to regenerate the JavaScript assets:
9090

91-
```
91+
```bash
9292
make playground
9393
```
9494

@@ -97,14 +97,15 @@ Once the compilation is complete and successuful, commit the newly-generated ass
9797
### Deploying
9898

9999
Commits added on some branches are automatically deployed:
100+
100101
* `main` on <https://OCaml.org/>
101102
* `staging` on <https://staging.OCaml.org/>
102103

103104
The deployment pipeline is managed in <https://github.com/ocurrent/ocurrent-deployer>, which listens to the `main` and `staging` branches and builds the site using the `Dockerfile` at the project's root. You can monitor the state of each deployment on [`deploy.ci.OCaml.org`](https://deploy.ci.OCaml.org/?repo=ocaml/OCaml.org).
104105

105106
To test the deployment locally, run the following commands:
106107

107-
```
108+
```bash
108109
docker build -t ocamlorg .
109110
docker run -p 8080:8080 ocamlorg
110111
```
@@ -129,7 +130,7 @@ before they get merged.
129130

130131
OCaml.org is using an opam switch that is local and bound to a pinned commit in `opam-repository`. This is intended to protect the build from upstream regressions. The opam repository is specified in three (3) places:
131132

132-
```
133+
```bash
133134
Dockerfile
134135
Makefile
135136
.github/workflows/*.yml

0 commit comments

Comments
 (0)