I have made a resume updating workflow with simple tools recently and going to share it here.

After Implementation, the workflow is like this:

  1. Write a resume in Markdown
  2. Commit to Bitbucket
  3. Build it to PDF (Automatic)
  4. Update the file in the cloud storage (Automatic)

Prepare Markdown

Edit a text file and commit it to version control is a routine for every day.

Generate PDF

Bitbucket pipeline feature is easy for to doing some automation work. I used it to automate the process of converting markdown to PDF and uploading the file to cloud storage.
I use markdown-pdf module to convert the markdown to the PDF. The blow is my PDF generator script in Typescript.

import markdownpdf from "markdown-pdf";
import * as fs from "fs";
let mdEnString: String = fs.readFileSync("ResumeEn.md", "utf8");
let mdZhString: String = fs.readFileSync("ResumeZh.md", "utf8");
let version = (new Date()).toLocaleString();
mdEnString = mdEnString.replace(/{version}/, version);
mdZhString = mdZhString.replace(/{version}/, version);
    cssPath: "css/pdf.css"
}).from.string([mdEnString, mdZhString]).to(["ResumeEn.pdf", "ResumeZh.pdf"]);

As showing above, I have custom CSS file. It is for setting the custom font for Chines characters.

Here is my bitbucket-pipeline.yml file.

image: node:6.9.4

    - step:
        name: Deploy to GCloud
        deployment: test   # set to test, staging or production
          - node
        script: # Modify the commands below to build your repository.
          - npm install
          - npm start
          # Downloading the Google Cloud SDK
          - curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-155.0.0-linux-x86_64.tar.gz
          - tar -xvf /tmp/google-cloud-sdk.tar.gz -C /tmp/
          - /tmp/google-cloud-sdk/install.sh -q
          - source /tmp/google-cloud-sdk/path.bash.inc

          - echo $GCLOUD_API_KEYFILE | base64 --decode --ignore-garbage > ./gcloud-api-key.json
          - gcloud auth activate-service-account --key-file gcloud-api-key.json
          - gsutil cp file-name.pdf gs://bucket-name/
          - gsutil acl ch -u AllUsers:R gs://bucket-name/file-name.pdf

As a result, after every commit pushed to the Bitbucket, the pipeline generates a PDF file and upload it the Google Cloud Storage and replace with the old one.
There is the generated files.