Skip to content

docs: Improve the tutorial howto-deploy-learn-ocaml-statically #504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions docs/howto-deploy-learn-ocaml-statically.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ How to deploy learn-ocaml statically
This section explains how to deploy a static version of learn-ocaml on
an HTTP server.

## Using pre-built docker images
## Compilation using pre-built docker images

You will just need to:

- install Docker Engine (<https://docs.docker.com/get-docker/>)
- build the `www` folder by using the commands below
- use an HTTP server to serve learn-ocaml statically.

Then use either of the following approaches:

### Manual docker commands

Assuming your exercise repository is in directory `$REPOSITORY` and
you want to generate the website contents in directory `$TARGET/www`
to serve it at `$URL` (the base URL **without trailing slash**), then
you can run:
run the following commands:

```bash
# Remove old version
Expand All @@ -39,11 +43,18 @@ then you should first run:
export URL=https://user-name.github.io/repo-name
```

### An automatic deploy script

Just use the following script, committed within a GitHub Pages repo:

- <https://github.com/erikmd/learn-ocaml-meetup-demo/blob/master/deploy>

For a comprehensive example of one such deployment, you may take a
look at the following repository:
- <https://github.com/pfitaxel/pfitaxel-demo>
- deployed to <https://pfitaxel.github.io/pfitaxel-demo>
- thanks to this [`deploy` script](https://github.com/pfitaxel/pfitaxel-demo/blob/master/deploy).
look at the following repos:

- <https://github.com/erikmd/learn-ocaml-meetup-demo-repository> (with extensive documentation in the [README.md](https://github.com/erikmd/learn-ocaml-meetup-demo-repository#readme))
- <https://github.com/erikmd/learn-ocaml-meetup-demo> (separated repo containing a .gitignore and the `deploy` script)
- <https://erikmd.github.io/learn-ocaml-meetup-demo/> (URL of the deployment)

## Manual compilation

Expand Down