update hugo version in blog.yml #5
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
# Based on https://swharden.com/blog/2022-03-20-github-actions-hugo/ | |
name: Deploy blog | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v3 | |
- name: β¨ Setup Hugo | |
env: | |
HUGO_VERSION: 0.122.0 | |
run: | | |
mkdir ~/hugo | |
cd ~/hugo | |
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz | |
tar -xvzf hugo.tar.gz | |
sudo mv hugo /usr/local/bin | |
- name: π οΈ Build | |
run: hugo | |
- name: π Create Key File | |
run: install -m 600 -D /dev/null ~/.ssh/id_rsa | |
- name: π Populate Key | |
run: echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa | |
- name: π Load Host Keys | |
run: echo "${{ secrets.KNOWN_HOSTS }}" > ~/.ssh/known_hosts | |
- name: π Upload | |
run: rsync --archive --stats -e 'ssh' public/ [email protected]:/srv/http/blog.z3r0d4y.dev/public | |