A little container image for a CI step that pushes markdown files from a given repository to the documentation system.
Go to file
Linus Sehn b299668782
All checks were successful
continuous-integration/drone/push Build is passing
Some minor README modifications
2023-01-05 12:09:50 +01:00
docs Change back to 00_README 2023-01-02 15:16:22 +01:00
LICENSES Add missing licenses 2022-12-16 09:19:18 +01:00
.drone.yml Format .drone.yml 2023-01-02 11:32:37 +01:00
.gitignore Make REUSE-compliant again 2022-12-16 09:16:21 +01:00
Dockerfile Don't use root user 2023-01-02 11:16:00 +01:00
push-to-docs.sh Insert newlines 2023-01-03 14:15:27 +01:00
README.md Some minor README modifications 2023-01-05 12:09:50 +01:00

docs-centralizer

in docs.fsfe.org standard-readme compliant REUSE status

A small helper script running in CI that cross-publishes project-specific documentation to docs.fsfe.org.

Table of Contents

Background

Install

You can clone this repo by running:

git clone git@git.fsfe.org:fsfe-system-hackers/docs-centralizer.git

Then, you can build the container image:

docker build . -t docs-centralizer:dev

Then the script should only be run in a container. In order for this to work, the following environment variables need to be set.

  • SSH_PRIVATE_KEY: The private SSH key (without the -----BEGIN/END OPENSSH PRIVATE KEY-----) of the docs-bot user.

  • REPO_NAME: The name of the repository whose documentation you want to publish to https://docs.fsfe.org. For example, the REPO_NAME in this project would be docs-centralizer

Finally, simply run the container to test your changes:

docker run \
  -e SSH_PRIVATE_KEY \
  -e REPO_NAME='docs-centralizer' \
  -v $(pwd):/src docs-centralizer:dev

Usage

In order to integrate the docs from your repository into our centralized documentation at https://docs.fsfe.org, simply add the following step to the .drone.yml of your new repo:

- name: push-to-docs
  image: git.fsfe.org/fsfe-system-hackers/docs-centralizer:latest
  environment:
    REPO_NAME: example-repository
    SSH_PRIVATE_KEY:
      # This is an organisation secret, so you don't need to set it
      from_secret: docs_bot_private_key
  when:
    branch:
      - master
    event:
      - push

To indicate that this repo's documentation is on https://docs.fsfe.org, please add this badge:

[![in docs.fsfe.org](https://img.shields.io/badge/in%20docs.fsfe.org-OK-green)](https://docs.fsfe.org/repodocs/<repo_name>/00_README)

where you replace <repo_name> at the end with the name of the respective repo.

Maintainers

@linus

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

GPL-3.0-or-later © 2022 Free Software Foundation Europe