Skip to content

Update README.md

Update README.md #13

Workflow file for this run

name: build and deploy jasonheppler.org
on:
push:
branches:
- main
jobs:
build_deploy:
name: build and deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.135.0'
- name: Build
run: hugo --minify
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
echo "Host ${{ secrets.SERVER_HOST }}
HostName ${{ secrets.SERVER_HOST }}
User ${{ secrets.SERVER_USER }}
IdentityFile ~/.ssh/deploy_key
IdentitiesOnly yes
StrictHostKeyChecking no" > ~/.ssh/config
- name: Deploy with rsync (DRY RUN)
run: |
rsync --dry-run --omit-dir-times --checksum -avz --itemize-changes --delete \
public/ ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}:~/public_html/
# - name: Show changed files
# run: |
# ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} \
# "find ~/public_html -type f -mtime -1 -ls | egrep -v '^\\.'"