Skip to content

Adjust native language from Chinese to Mandarin #11

Adjust native language from Chinese to Mandarin

Adjust native language from Chinese to Mandarin #11

Workflow file for this run

name: Build Resume
on:
push:
paths-ignore:
- 'README.md'
- '.gitignore'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Roboto fonts
run: sudo apt install -y fonts-roboto
- name: Install Source Sans & Source Han Sans TW fonts
run: |
curl -sL -o SourceSans3.zip https://github.com/adobe-fonts/source-sans/releases/download/3.052R/OTF-source-sans-3.052R.zip
curl -sL -o SourceSansPro.zip https://github.com/adobe-fonts/source-sans/releases/download/3.006R/source-sans-pro-3.006R.zip
curl -sL -o SourceHanSansTW.zip https://github.com/adobe-fonts/source-han-sans/releases/latest/download/SourceHanSansTW.zip
unzip -d SourceSans3 SourceSans3.zip
unzip -d SourceSansPro SourceSansPro.zip
unzip -d SourceHanSansTW SourceHanSansTW.zip
cp SourceSans3/OTF/*.otf /usr/share/fonts/
cp SourceSansPro/source-sans-pro-3.006R/OTF/*.otf /usr/share/fonts/
cp SourceHanSansTW/SubsetOTF/TW/*.otf /usr/share/fonts/
fc-cache -fv
- name: Setup Typst
uses: yusancky/setup-typst@v2
id: setup-typst
with:
version: 'latest'
- name: Print supported fonts
run: typst fonts
- name: Build resume
run: typst compile resume.typ
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: Resume-PDF
path: resume.pdf
if-no-files-found: error
render:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
with:
name: Resume-PDF
- name: Install poppler-utils
run: sudo apt install -y poppler-utils
- name: Render resume as PNG
run: pdftoppm resume.pdf resume -png -r 300
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: Resume-PNG
path: '*.png'
if-no-files-found: error
upload:
runs-on: ubuntu-latest
needs:
- render
if: "github.ref == 'refs/heads/main'"
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2