Skip to content

update resume

update resume #51

Workflow file for this run

name: Publish to Github Pages
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: test resume updated string
run: |
dtstr=$(date --date="@$(git log -1 --pretty="format:%ct" static/files/resume.pdf)" +"%b %Y")
grep "$dtstr" i18n/en.toml &>/dev/null || { echo "update i18n/en.toml file with '$dtstr'" ; exit 1 ; }
deploy:
runs-on: ubuntu-22.04
needs: [test]
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.74.3'
extended: true
- name: Build
run: |
today=$(date +%Y-%m-%d)
sed -i -E "s@^modifiedTime:.*@modifiedTime: \"${today}\"@" data/en/site.yaml
hugo --gc --minify --cleanDestinationDir
[ -f ./CNAME ] && cp ./CNAME ./public/CNAME || true
[ -f ./ALIAS ] && cp ./ALIAS ./public/ALIAS || true
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public