Skip to content

use checkout v3

use checkout v3 #46

Workflow file for this run

name: On Push
on:
push:
branches: [main, dev]
workflow_dispatch:
jobs:
autogenerate-pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- run: git config --global user.name 'James Spears 🤖'
- run: git config --global user.email 'james.w.spears@gmail.com'
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: src/resume.tex
env:
TEXINPUTS: ".:./src//:"
- name: Git pull
run: git pull
- name: Git add
run: git add .
- name: Git commit
run: git diff-index --quiet HEAD || git commit -m "Resume PDF updated [skip ci]"
- name: Git push
run: git push
autogenerate-docx:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- run: git config --global user.name 'James Spears 🤖'
- run: git config --global user.email 'james.w.spears@gmail.com'
- name: Compile LaTeX document
uses: docker://pandoc/core:2.9
with:
args: >- # allows you to break string into multiple lines
-s ./src/resume.tex
-o resume.docx
--resource-path ./src
- name: Git pull
run: git pull
- name: Git add
run: git add .
- name: Git commit
run: git diff-index --quiet HEAD || git commit -m "Resume DOCX updated [skip ci]"
- name: Git push
run: git push
version-bump:
runs-on: ubuntu-latest
needs: [autogenerate-pdf, autogenerate-docx]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_PERSONAL_ACCESS_TOKEN }}
- run: git config --global user.name 'James Spears 🤖'
- run: git config --global user.email 'james.w.spears@gmail.com'
- name: Git pull
run: git pull
- name: Patch version
if: endsWith(github.ref, '/main')
run: echo "version=$(npm version patch -m 'Bump version v%s [skip ci]')" >> $GITHUB_ENV
- name: Prepatch version
if: endsWith(github.ref, '/dev')
run: echo "version=$(npm version prerelease -m 'Bump version v%s [skip ci]')" >> $GITHUB_ENV
- name: Git push
run: git push
- name: Create Tag
run: git push origin ${{ env.version }}