Skip to content

Commit

Permalink
change the action build method & update English version
Browse files Browse the repository at this point in the history
  • Loading branch information
NorthSecond committed Mar 23, 2024
1 parent 4e5069e commit e9e72c8
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 22 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,32 @@ jobs:
contents: write
steps:
- name: Checkout master
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: yusancky/setup-typst@v2
- uses: typst-community/setup-typst@v3
id: setup-typst
with:
version: 'v0.7.0'
- name: Build PDF
run: 'make all'
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v5.0.0
# - name: Git Auto Commit
# uses: stefanzweifel/git-auto-commit-action@v5.0.0
# with:
# commit_message: 'Update resume PDF'
# commit_options: '--no-verify --signoff'
# branch: 'main'
# file_pattern: '*.pdf'
# repository: .
- uses: actions/upload-artifact@v4
with:
name: resume-pdf
path: |
个人简历.pdf
Resume.pdf
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
commit_message: 'Update resume PDF'
commit_options: '--no-verify --signoff'
branch: 'main'
file_pattern: '*.pdf'
repository: .
files: |
个人简历.pdf
Resume.pdf
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

# The PDF files which are only needed located in the root directory
# We should not upload the PDF files in the template directory and src directory
template/*.pdf
src/*.pdf
*.pdf
Binary file removed Resume_English.pdf
Binary file not shown.
10 changes: 7 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
cur_makefile_path := $(dir $(mkfile_path))

all: clean zh en

clean:
find . -name "*.pdf" | xargs rm -f

zh:
typst compile --font-path ./fonts --root $(cur_makefile_path) src/chinese.typ 中文简历.pdf
typst compile --font-path ./fonts --root $(cur_makefile_path) src/chinese.typ 个人简历.pdf

en:
typst compile --font-path ./fonts --root $(cur_makefile_path) src/english.typ Resume_English.pdf
typst compile --font-path ./fonts --root $(cur_makefile_path) src/english.typ Resume.pdf

all: clean zh en
build: all

.PHONY: all
13 changes: 7 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

### Github Actions

对于本地没有安装 Typst 的使用者,可以通过 Github Actions 实现自动部署。在每一次提交后,Github Actions 会自动运行 Typst 并将生成的 PDF Commit 到根目录中。

> Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
对于本地没有安装 Typst 的使用者,可以通过 Github Actions 实现自动部署。在每一次提交后,Github Actions 会自动运行 Typst 并将生成的 PDF 文件打包提供下载。

## 使用方式

Expand All @@ -39,14 +37,17 @@

### Github Actions

项目配置了自动部署的 Github Actions,可以在每次提交后自动运行 Typst (执行的命令是 `make all`)并将生成的 PDF Commit 到根目录中(对于 Fork 的子仓库,可能需要手动打开 Github Action 功能)。
项目配置了自动部署的 Github Actions,可以在每次提交后自动运行 Typst (执行的命令是 `make all`)并将生成的 PDF 文件打包提供下载。可以在 `Actions` 标签页查看运行结果,并在对应运行时的 `Summary` 页面的 `Artifacts` 中下载生成的 PDF 文件压缩包。

### Github Release

项目配置了 Github Release,对于正式版本的发布,使用 `git tag` 功能打上版本号标签,Github Actions 会自动将生成的 PDF 文件发布到 Github Release 页面。

### Typst Web

我制作了一个 typst.app 上的在线项目,[链接](https://typst.app/project/r4XMUB3ENQUH7zWiuK7_tO)。但是由于字体不太好上传,所以暂时还不是特别推荐。

## TBD

- [ ] 英文版示例与字体
- [x] 英文版示例与字体
- [ ] 证件照插入的解决方案

124 changes: 124 additions & 0 deletions src/english.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@

// import from template
#import "../template/template.typ": *;
#show: template;

#set text(
size: 12pt,
font: "Centaur"
)

#init(
name: "San Zhang",
pic_path : "",
)

#info(
color: rgb(0, 0, 0),
(
icon: "/img/fa/fa-home.svg",
link: "https://zhangsan.io/",
content: "https://zhangsan.io/"
),
(
icon: fa_github,
link: "https://github.com/NorthSecond",
content: "NorthSecond"
),
(
icon: fa_email,
link: "mailto:San%20Zhang<me@zahangsan.io>",
content: "me@zhangsan.io",
),
(
icon: fa_phone,
link: "tel:+86 133 3333 3333",
content: "+86 133 3333 3333",
),
)


#resume_section("Education")

#resume_item(
"XXX University",
"Master of Engineering",
"Computer Science and Technology",
"2024.09 -- 2027.07"
)

#resume_item(
"XXXX University",
"Bachelor of Engineering",
"Software Engineering",
"2020.09 -- 2024.06"
)

#resume_section("Publications")

- [CVPR 2024]*You*, #lorem(5), and #lorem(1). "#lorem(10)" Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2024.
- [CVPR 2023]*You*, #lorem(5), and #lorem(1). "#lorem(10)" Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023.

#resume_section([Selected Projects])

#resume_item(
lorem(5),
"Computer Architecture",
lorem(8),
"2023.12 -- 2026.11"
)
#resume_desc(
"Description",
lorem(32)
)
#resume_desc(
"Contribution",
lorem(24)
)
#resume_desc(
"Achievement",
lorem(12)
)

#resume_section([Experience])

#resume_item(
lorem(8),
"Student Assistant",
lorem(3),
"2021.11 -- 2024.06"
)
#resume_desc(
"Description",
lorem(24)
)

#resume_section([Competitions and Awards])

#resume_desc(
"Professional Skills Competition",
lorem(8)
)
#resume_desc(
"Scholarship",
lorem(24)
)
#resume_desc(
"Other Administrative Awards",
lorem(12)
)

#resume_section([Skills and Interests])

#resume_desc(
"Programming Languages",
[Proficient in C/C++; familiar with Rust, Python; have experience in Java, SQL, Matlab, TypeScript, Golang and some other languages.]
)
#resume_desc(
"Development Tools",
[Proficient in Git, Docker, Kubernetes, familiar with Jenkins, Travis CI, Circle CI, etc.]
)
#resume_desc(
"Interests",
[Machine Learning, Computer Vision, Compiler, System Programming, etc.]
)
Binary file removed 中文简历.pdf
Binary file not shown.

0 comments on commit e9e72c8

Please sign in to comment.