From 6b4342cf90d503ba90eb8c88970ea74353eda55b Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 22 Oct 2024 14:35:29 +0800 Subject: [PATCH] Separate secrets informations --- .github/workflows/build.yaml | 4 +++- .gitignore | 1 + resume.typ | 3 ++- secrets.typ | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 secrets.typ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b7fb1b6..582b7fe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,9 @@ jobs: - name: Print supported fonts run: typst fonts - name: Build resume - run: typst compile resume.typ + run: | + touch secrets.toml + typst compile resume.typ - name: Upload Artifacts uses: actions/upload-artifact@v3 with: diff --git a/.gitignore b/.gitignore index ce0acdb..17957d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ resume.pdf +secrets.toml diff --git a/resume.typ b/resume.typ index 79a7be9..c60c33b 100644 --- a/resume.typ +++ b/resume.typ @@ -1,4 +1,5 @@ #import "template.typ": * +#import "secrets.typ": secret #show: resume.with( author: ( @@ -6,7 +7,7 @@ lastname: "Chen", chinesename: "陳少甫", email: "leo881003@gmail.com", - phone: "", + phone: secret("phone"), github: "Leo1003", linkedin: "少甫-陳-3b0b3a20a", positions: ( diff --git a/secrets.typ b/secrets.typ new file mode 100644 index 0000000..9f704a8 --- /dev/null +++ b/secrets.typ @@ -0,0 +1,4 @@ +#let secret_data = toml("secrets.toml") +#let secret(key) = { + secret_data.at(key, default: "") +}