-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds github actions for auto deployment of cv
creates github pages
- Loading branch information
Showing
2 changed files
with
77 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,66 @@ | ||
name: "Publish CV" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
env: | ||
ARTIFACTS_DIR: ./github-artifacts | ||
TEX_FILE: farhood-etaati-cv.tex | ||
PDF_FILE: farhood-etaati-cv.pdf | ||
jobs: | ||
build_latex: | ||
build-latex: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Git repository | ||
uses: actions/checkout@v3 | ||
- name: Compile LaTeX document | ||
uses: xu-cheng/latex-action@v3 | ||
with: | ||
root_file: farhood-etaati-cv.tex | ||
root_file: $TEX_FILE | ||
- name: move | ||
run: mkdir -p github_artifacts && mv ${{ env.PDF_FILE }} ${{ env.ARTIFACTS_DIR }} | ||
- name: Upload PDF file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: PDF | ||
path: farhood-etaati-cv.pdf | ||
name: ${{ env.PDF_FILE }} | ||
path: ${{ env.ARTIFACTS_DIR }} | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: [build-latex] | ||
env: | ||
GITHUB_PAGES_DIR: ./github_pages | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: ${{ env.ARTIFACTS_DIR }} | ||
- name: Move to pages directory | ||
run: mv ${{ env.ARTIFACTS_DIR }} ${{ env.GITHUB_PAGES_DIR }} | ||
- name: deploy on orphan branch | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ${{ env.GITHUB_PAGES_DIR }} | ||
publish_branch: build | ||
force_orphan: true | ||
enable_jekyll: true | ||
|
||
copy-index-to-build: | ||
needs: [deploy] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Copy To Branches Action | ||
uses: planetoftheweb/[email protected] | ||
env: | ||
key: main | ||
files: index.html CNAME | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
|
||
<!--You can add your name and affiliation below to personalise --> | ||
<meta property="og:title" content="CV" /> | ||
<meta property="og:name" content="Farhood Etaati" /> | ||
<meta property="og:location" content="Tehran/Iran" /> | ||
|
||
<!--You can add your keywords to personalise--> | ||
<meta | ||
property="og:description" | ||
content="MLOps, Machine Learning, Software Engineering, Backend Engineer" | ||
/> | ||
|
||
<meta | ||
property="og:image" | ||
content="https://dummyimage.com/100x100/000/fff&text=CV" | ||
/> | ||
<title>CV</title> | ||
</head> | ||
<body> | ||
<script type="text/javascript"> | ||
window.location.href = "./farhood-etaati-cv.pdf"; | ||
</script> | ||
</body> | ||
</html> |