Giter Club home page Giter Club logo

docker-org-publish's Introduction

Docker for Org-file Publishing

https://img.shields.io/docker/build/brandonwillard/org-publish.svg

Introduction

This repository contains a Docker build capable of org-babel evaluation of Python 3.6 code and LaTeX/PDF compilation in Ubuntu 17.10.

The Python setup consists of Anaconda’s Python 3.6, and org-mode running on a minimal Emacs-25 installation with Elisp dependencies managed by Cask.

There is an example org-babel configuration and =Makefile= in =src/org=.

Example CI Setup

The Docker image in this repository was created with continuous integration in mind.

For example, the following is a CircleCI config that uses the image alongside the org-babel build setup in =src/org=:

version: 2
jobs:
  build:
    docker:
      - image: brandonwillard/org-publish:latest

    working_directory: ~/org-file-project-repo

    steps:

      - checkout

      - restore_cache:
         key: conda-{{ checksum "environment.yml" }}

      - run: conda update -qy -n base conda

      # A utility for adding new GitHub releases
      - run: |
          conda install -qy -c conda-forge go==1.10
          go get github.com/tcnksm/ghr

      # Our project/repo has a conda env specified in an 'environment.yml' file
      - run: conda env create --force -q -f environment.yml -n build-env

      - save_cache:
         key: conda-{{ checksum "environment.yml" }}
         paths:
           - "/opt/conda"

      # Activate our conda env and compile our Org file to PDF.
      - run: |
          . /opt/conda/etc/profile.d/conda.sh
          conda activate build-env
          make -C src/org -f Makefile the-resulting.pdf

      # Save the resulting PDF and any images produced.
      - store_artifacts:
          path: ~/org-file-project-repo/output/the-resulting.pdf
      - store_artifacts:
          path: ~/org-file-project-repo/figures

      # Create the GitHub release (needs a tag from `git describe --tags`).
      # XXX: You'll need to create a GitHub API token environment variable
      # (named 'GITHUB_TOKEN') in the CircleCI project.
      - deploy:
          command: /root/go/bin/ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -replace -prerelease `git describe --tags` output/the-resulting.pdf

workflows:
  version: 2
  build-and-deploy:
    jobs:
      - build

docker-org-publish's People

Contributors

brandonwillard avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.