Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 3.94 KB

File metadata and controls

48 lines (34 loc) · 3.94 KB

Contributing

How docs.ruby-lang.org/en Works

The English Ruby documentation is automatically generated and updated through a pipeline involving GitHub Actions, AWS S3, and systemd services. Here's how it all comes together:

  1. Documentation Generation and Upload

    • A scheduled GitHub Action generates the documentation for all actively maintained Ruby versions plus the master branch. Each documentation set is generated using the version of RDoc bundled with that specific Ruby version.
      • Example: For Ruby 3.3, the documentation is generated with RDoc 6.6.3.1.
    • The generated docs are uploaded as ruby-docs-en-<version>.tar.xz to the ftp.r-l.o/pub/ruby/doc/ S3 bucket.
  2. Website Update

    • On the server running this application, the update-docs-en.timer systemd timer triggers the rdoc-static-all service at scheduled intervals.
    • The rdoc-static-all service runs the rdoc-static-all script.
      • This script downloads the latest documentation from S3 and updates the website accordingly.

How docs.ruby-lang.org/ja Works

The Japanese Ruby documentation (Rurema) is automatically generated and updated through a pipeline involving GitHub repositories, systemd services, and BitClust tool. Here's how it all comes together:

  1. Documentation Generation and Upload

    • The Japanese documentation is generated from the rurema/doctree repository, which contains the source documents for the Rurema project.
    • Pre-generated documentation databases and HTML files are maintained in the rurema/generated-documents repository.
  2. Website Update

    • On the server running this application, the update-docs-ja.timer systemd timer triggers the bc-setup-all service at scheduled intervals (daily at 20:15).
    • The bc-setup-all service runs the bc-setup-all script.
      • This script updates the local repositories (bitclust, doctree, and generated-documents) and links the pre-generated documentation databases.
  3. Static HTML Generation

    • When the bc-setup-all script completes, it triggers the bc-static-all.path systemd path unit by updating a timestamp file.
    • The path unit triggers the bc-static-all.service, which runs the bc-static-all script.
    • The bc-static-all script:
      • Syncs pre-generated HTML files from the generated-documents repository to the web server directory
      • Creates symbolic links for latest and master versions
      • Purges the Fastly cache for updated content