Skip to content

Merge pull request #63 from pka/fix-readme #7

Merge pull request #63 from pka/fix-readme

Merge pull request #63 from pka/fix-readme #7

name: Build and deploy web site
on:
push:
branches:
- main
- staging
pull_request:
jobs:
deploy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.111.3'
# extended: true
- name: Build
run: cd shortbread-website && hugo
- name: Deploy site
if: github.ref == 'refs/heads/main'
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
run: |
eval $(ssh-agent -s)
ssh-add - <<< "${SSH_KEY}"
rsync --exclude=/w --delete -r -e "ssh -o StrictHostKeyChecking=no -p 22" shortbread-website/public/ [email protected]:/
- name: Deploy site (staging)
if: github.ref == 'refs/heads/staging'
env:
SSH_KEY: ${{ secrets.SSH_KEY_STAGING }}
run: |
eval $(ssh-agent -s)
ssh-add - <<< "${SSH_KEY}"
rsync --exclude=/w --delete -r -e "ssh -o StrictHostKeyChecking=no -p 22" shortbread-website/public/ [email protected]:/