Skip to content

Commit 07bde8b

Browse files
[setup](build): some are mine, others from @mszep/pandoc_resume (#104)
* [setup](build): some are mine, others from @mszep/pandoc_resume Signed-off-by: Ralph Hightower <[email protected]> * [setup](build): from @mszep/pandoc_resume Signed-off-by: Ralph Hightower <[email protected]> * [setup](build): mv to correct directory Signed-off-by: Ralph Hightower <[email protected]> * [setup](build): mv to correct directory Signed-off-by: Ralph Hightower <[email protected]> * [setup](build): mv .docker Signed-off-by: Ralph Hightower <[email protected]> * [setup](build): mv to correct directory Signed-off-by: Ralph Hightower <[email protected]> * [setup](build): styles/ Signed-off-by: Ralph Hightower <[email protected]> * [setup](build): mv to correct directory Signed-off-by: Ralph Hightower <[email protected]> * [setup](build): mv to correct directory Signed-off-by: Ralph Hightower <[email protected]> * [setup](build): most from @RalphHightower, others Signed-off-by: Ralph Hightower <[email protected]> --------- Signed-off-by: Ralph Hightower <[email protected]>
1 parent 9fa0583 commit 07bde8b

File tree

17 files changed

+502
-2
lines changed

17 files changed

+502
-2
lines changed

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.tuc
2+
*.log
3+
*.pdf
4+
*.html
5+
resume.tex
6+
*.swo
7+
*.swp
8+
*.docx
9+
*.rtf
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This workflow updates the docker container which has context and
2+
# pandoc installed, and on which the resume documents are built. The
3+
# workflow runs whenever the dockerfile is changed, and updates the
4+
# container image in the Github Packages registry.
5+
6+
name: Publish Docker Image
7+
8+
# Controls when the action will run.
9+
on:
10+
# Triggers the workflow on push events but only for the master branch
11+
push:
12+
branches: [ master ]
13+
paths-ignore:
14+
- 'markdown/**'
15+
16+
# Allows you to run this workflow manually from the Actions tab
17+
workflow_dispatch:
18+
19+
env:
20+
REGISTRY: ghcr.io
21+
IMAGE_NAME: ${{ github.repository }}
22+
23+
jobs:
24+
push_to_registry:
25+
name: Push Docker image to GitHub Packages
26+
runs-on: ubuntu-latest
27+
permissions:
28+
packages: write
29+
contents: read
30+
steps:
31+
- name: Check out the repo
32+
uses: actions/checkout@v2
33+
34+
- name: Log in to the Container registry
35+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
36+
with:
37+
registry: ${{ env.REGISTRY }}
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Extract metadata (tags, labels) for Docker
42+
id: meta
43+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
44+
with:
45+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
46+
47+
- name: Build and Push to GitHub Packages
48+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
49+
with:
50+
context: .
51+
file: .docker/resume.dockerfile
52+
push: true
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}
55+

.github/workflows/main.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: build-resume
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ master ]
10+
paths:
11+
- 'markdown/**'
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
jobs:
17+
build-resume:
18+
runs-on: ubuntu-latest
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
23+
- name: Test directory contents
24+
run: 'ls -al'
25+
26+
- name: Build resume
27+
uses: ./actions
28+
29+
- name: Upload a Build Artifact
30+
uses: actions/[email protected]
31+
with:
32+
# Artifact name
33+
name: Resume PDF # optional, default is artifact
34+
# A file, directory or wildcard pattern that describes what to upload
35+
path: output/*.pdf
36+

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.log
2+
*.swo
3+
*.swp
4+
output/
5+
result
6+
result-*
7+
.envrc
8+
.direnv

.pandoc/pandoc.dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM pandoc/latex:2.9
2+
3+
RUN apk add make texlive
4+
5+
ENV TEXMF /usr/share/texmf-dist
6+
7+
COPY actions/entrypoint.sh /entrypoint.sh

Makefile

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
OUT_DIR=output
2+
IN_DIR=markdown
3+
STYLES_DIR=styles
4+
STYLE=chmduquesne
5+
6+
all: html pdf docx
7+
8+
kitchensink: html pdf docx rtf
9+
10+
pdf: init
11+
for f in $(IN_DIR)/*.md; do \
12+
FILE_NAME=`basename $$f | sed 's/.md//g'`; \
13+
echo $$FILE_NAME.pdf; \
14+
pandoc --standalone --template $(STYLES_DIR)/$(STYLE).tex \
15+
--from markdown --to context \
16+
--variable papersize=A4 \
17+
--output $(OUT_DIR)/$$FILE_NAME.tex $$f > /dev/null; \
18+
mtxrun --path=$(OUT_DIR) --result=$$FILE_NAME.pdf --script context $$FILE_NAME.tex > $(OUT_DIR)/context_$$FILE_NAME.log 2>&1; \
19+
done
20+
21+
html: init
22+
for f in $(IN_DIR)/*.md; do \
23+
FILE_NAME=`basename $$f | sed 's/.md//g'`; \
24+
echo $$FILE_NAME.html; \
25+
pandoc --standalone --include-in-header $(STYLES_DIR)/$(STYLE).css \
26+
--lua-filter=pdc-links-target-blank.lua \
27+
--from markdown --to html \
28+
--output $(OUT_DIR)/$$FILE_NAME.html $$f \
29+
--metadata pagetitle=$$FILE_NAME;\
30+
done
31+
32+
docx: init
33+
for f in $(IN_DIR)/*.md; do \
34+
FILE_NAME=`basename $$f | sed 's/.md//g'`; \
35+
echo $$FILE_NAME.docx; \
36+
pandoc --standalone $$SMART $$f --output $(OUT_DIR)/$$FILE_NAME.docx; \
37+
done
38+
39+
rtf: init
40+
for f in $(IN_DIR)/*.md; do \
41+
FILE_NAME=`basename $$f | sed 's/.md//g'`; \
42+
echo $$FILE_NAME.rtf; \
43+
pandoc --standalone $$SMART $$f --output $(OUT_DIR)/$$FILE_NAME.rtf; \
44+
done
45+
46+
init: dir version
47+
48+
dir:
49+
mkdir -p $(OUT_DIR)
50+
51+
version:
52+
PANDOC_VERSION=`pandoc --version | head -1 | cut -d' ' -f2 | cut -d'.' -f1`; \
53+
if [ "$$PANDOC_VERSION" -eq "2" ]; then \
54+
SMART=-smart; \
55+
else \
56+
SMART=--smart; \
57+
fi \
58+
59+
clean:
60+
rm -f $(OUT_DIR)/*

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Reporting Security Issues
22

3-
To report a security issue, please email [ralph.hightower+blog-[email protected]](milto:ralph.hightower+blog[email protected])
3+
To report a security issue, please email [ralph.hightower+EOL-Hightower-[email protected]](milto:ralph.hightower+EOL-Hightower[email protected])
44
with a description of the issue, the steps you took to create the issue,
55
affected versions, and, if known, mitigations for the issue.
66

SUPPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.
66

7-
- **[RalphHightower/blog](https://github.com/RalphHightower/blog/)** is under active development and maintained by @RalphHightower. I will do my best to respond to support, feature requests, and community questions in a timely manner.
7+
- **[RalphHightower/EOL-Hightower](https://github.com/RalphHightower/EOL-Hightower/)** is under active development and maintained by @RalphHightower. I will do my best to respond to support, feature requests, and community questions in a timely manner.
88

99
## @RalphHightower Support Policy
1010

action/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# action.yml
2+
name: 'Texlive Build'
3+
description: 'Build a document using texlive'
4+
runs:
5+
using: 'docker'
6+
image: 'docker://ghcr.io/mszep/pandoc_resume:master'
7+
entrypoint: '/entrypoint.sh'

action/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
sh -c "cd /home/app/resume && make pdf"

0 commit comments

Comments
 (0)