Build and Publish to Github Pages #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish to Github Pages | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
# first of every month at 3am UTC | |
- cron: '0 3 1 * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout | |
- uses: actions/checkout@v2 | |
# Build tex with docker image | |
- run: docker run --rm -v $(pwd):/data woodjme/tex xelatex cv.tex | |
- run: mv cv.pdf dist/cv.pdf | |
- run: echo 'cv.jamiewood.io' > dist/CNAME | |
- run: echo '<html><script>window.location.href="https://cv.jamiewood.io/cv.pdf"</script></html>' > dist/index.html | |
# publish cv.pdf to gh-pages | |
- uses: JamesIves/github-pages-deploy-action@releases/v4 | |
with: | |
BRANCH: gh-pages | |
FOLDER: dist | |
CLEAN: true | |