Rebuild triggered by @FrozenDude101 #12
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 Deploy CV | |
run-name: Rebuild triggered by @${{github.actor}} | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
write-all | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build-cv: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out the Repository | |
uses: actions/checkout@v4 | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Build the CV | |
uses: xu-cheng/latex-action@v3 | |
with: | |
root_file: source/CV.tex | |
- name: Delete Previous Release(s) | |
uses: dev-drprasad/[email protected] | |
with: | |
keep_latest: 0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: latest | |
release_name: Current CV | |
body: | | |
Latest CV as of ${{ steps.date.outputs.date }} | |
Commit Message: | |
${{ github.event.head_commit.message }} | |
- name: Upload CV | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: CV.pdf | |
asset_name: Matthew-Hammond-CV.pdf | |
asset_content_type: pdf | |
- name: Move and Rename | |
run: mv CV.pdf build/Matthew-Hammond-CV.pdf | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "build" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |