Add post #26
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
name: Deploy to Github Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Install jq | |
run: sudo apt-get update && sudo apt-get install -y jq | |
- name: Set HUGO_VERSION as env variable | |
run: echo "HUGO_VERSION=$(jq -r '.build.env.HUGO_VERSION' vercel.json)" >> $GITHUB_ENV | |
- name: Install Hugo | |
run: | | |
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb | |
sudo dpkg -i hugo_extended_${HUGO_VERSION}_linux-amd64.deb | |
- name: Build site | |
run: hugo | |
- name: Deploy | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GH_PAT }} | |
publish_branch: gh-pages | |
publish_dir: ./public |