Skip to content
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

Feature (Technical Story): Automate the update of index.md #490

Closed
erikmd opened this issue Jun 2, 2022 · 0 comments · Fixed by #492, #486 or ocaml/opam-repository#22877
Closed

Feature (Technical Story): Automate the update of index.md #490

erikmd opened this issue Jun 2, 2022 · 0 comments · Fixed by #492, #486 or ocaml/opam-repository#22877
Assignees
Labels
kind: feature New user-facing feature.

Comments

@erikmd
Copy link
Member

erikmd commented Jun 2, 2022

Related project scope(s): GHA

Related user(s):

The problem

The README.md and docs/index.md can typically be out-of-sync.

Wanted solution

We should automate the update of docs/index.md:

  • create a bash script (#!/usr/bin/env bash) named scripts/update-index.sh that uses sed etc. to automatically overwrite docs/index.md from README.md
  • add a GitHub Action workflow named e.g. .github/workflows/check-update-index.yml for each pull request or for master:
    • which clones the repository,
    • runs scripts/update-index.sh
    • checks if git diff detects that docs/index.md should have been modified (committed)
    • in which case the GHA job raises an error (or just a warning if it is master) and suggests to "run scripts/update-index.sh and commit"…
@erikmd erikmd added the kind: feature New user-facing feature. label Jun 2, 2022
cesclass added a commit to pfitaxel/learn-ocaml that referenced this issue Jun 27, 2022
cesclass added a commit to pfitaxel/learn-ocaml that referenced this issue Jun 27, 2022
* The workflow check out the repo and execute update-index.sh.
  Then it check the diffs using git diff on index.md.

Related: ocaml-sf#490
cesclass added a commit to pfitaxel/learn-ocaml that referenced this issue Jun 27, 2022
cesclass added a commit to pfitaxel/learn-ocaml that referenced this issue Jun 27, 2022
* The workflow check out the repo and execute update-index.sh.
  Then it check the diffs using git diff on index.md.

Related: ocaml-sf#490
cesclass added a commit to pfitaxel/learn-ocaml that referenced this issue Jun 30, 2022
Related: ocaml-sf#490

Co-authored-by: Erik Martin-Dorel <erik@martin-dorel.org>
cesclass added a commit to pfitaxel/learn-ocaml that referenced this issue Jun 30, 2022
* The workflow check out the repo and execute update-index.sh.
  Then it check the diffs using git diff on index.md.

Related: ocaml-sf#490

Co-authored-by: Erik Martin-Dorel <erik@martin-dorel.org>
@erikmd erikmd added this to the learn-ocaml 0.15.0 milestone Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment