Skip to content

Update resume.json

Update resume.json #25

Workflow file for this run

name: create-release
on:
push:
paths:
- resume.json
- hack/**
- .github/workflows/create-release.yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.13.6'
- name: Template html
run: go run hack/template.go
- name: Html to pdf
uses: fifsky/html-to-pdf-action@master
with:
htmlFile: resume.html
outputFile: resume.pdf
pdfOptions: '{"format": "Letter", "margin": {"top": ".4in", "left": ".4in", "right": ".4in", "bottom": ".4in"}}'
- uses: actions/upload-artifact@v2
with:
name: resume
path: |
resume.html
resume.pdf
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
resume.html
resume.pdf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
if: startsWith(github.ref, 'refs/tags/')
with:
repository: kasuboski/personal-site
path: personal-site
- name: Copy files to personal-site
if: startsWith(github.ref, 'refs/tags/')
run: |
cp resume.html personal-site/static/resume.html
cp resume.pdf personal-site/static/resume.pdf
- uses: webfactory/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
ssh-private-key: ${{ secrets.personal_site_key }}
- name: Push Changes
if: startsWith(github.ref, 'refs/tags/')
run: |
cd personal-site
git remote rm origin || true
git remote add origin [email protected]:kasuboski/personal-site.git
git config user.email "[email protected]"
git config user.name "GitHub Actions"
git add --all
if output=$(git status --porcelain) && [ -z "$output" ]; then
echo "No Changes"
else
git commit -m "Update resume from ${GITHUB_REPOSITORY}@${GITHUB_SHA}"
git push origin master
fi