Updating my Docker documentation

In my last post I outlined an approach for automatically creating reproducible documentation using GitHub Actions. I have now updated my Docker documentation using the same approach but without using a container because then I’d have to run Docker inside a Docker container (which is actually possible using GitLab’s CI/CD platform but I haven’t tried using GitHub Actions). Since a container was not used, I had to rely on actions (custom applications for the GitHub Actions platform that perform a complex but frequently repeated task) and the command line to setup the dependencies. I used actions provided by the R infrastructure team to help me easily setup R and pandoc (required for the rmarkdown package) on the Github Actions virtual machine. In my GitHub Actions YAML file, I simply added the following lines:

      - uses: r-lib/actions/setup-r@v1
      - uses: r-lib/actions/setup-pandoc@v1

The rmarkdown package and MkDocs were installed using the following commands.

      - name: Install rmarkdown
        run: Rscript -e 'install.packages("rmarkdown", repos="http://cran.us.r-project.org")'

      - name: Install MkDocs
        run: python -m pip install --upgrade pip && pip install mkdocs pymdown-extensions

Despite not using a container, it was quite straightforward to set up the required tools. After setting up all the dependencies, R and the rmarkdown package were used to generate the documentation from the R Markdown document.

The use of GitHub and GitHub Actions makes it easy to create documentation that is simultaneously tested by running the commands. At some point I want to update all my other documentation repositories to use this approach for generating the documentation. For more information, please refer to my previous post.

Print Friendly, PDF & Email

Creative Commons License
This work is licensed under a Creative Commons
Attribution 4.0 International License

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.