Skip to content

Commit

Permalink
ci: add initial workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Hanford authored and Patrick Hanford committed Jun 25, 2024
1 parent ab0269a commit ee77313
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 25 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/copy-resume.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/generate-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Pandoc
run: |
sudo apt-get update
sudo apt-get install -y pandoc texlive texlive-xetex
- name: Convert index.md to resume.pdf
run: |
if [[ -f "index.md" ]]; then
pandoc index.md -o resume.pdf
echo "index.md has been converted to resume.pdf"
else
echo "index.md does not exist"
exit 1
fi
- name: Upload resume.pdf as artifact
uses: actions/upload-artifact@v3
with:
name: resume-pdf
path: resume.pdf
29 changes: 29 additions & 0 deletions .github/workflows/release-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Create Release

on:
release:
types: [created]

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: resume-pdf
path: .

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
files: resume.pdf

0 comments on commit ee77313

Please sign in to comment.