New Swarm Check In: Flora and Botanical Garden (Flora und Botanischer… #5063
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 with Hugo | |
on: | |
push: | |
branches: [ bascht.com ] | |
pull_request: | |
branches: [ bascht.com ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Hugo setup | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 0.89.2 | |
- name: Build | |
run: hugo --minify -d public_html | |
- name: SSH setup | |
if: github.ref == 'refs/heads/bascht.com' | |
env: | |
DEPLOY_KEY: ${{ secrets.deploy_key }} | |
KNOWN_HOSTS: ${{ secrets.known_hosts }} | |
run: | | |
mkdir -p ~/.ssh | |
echo "${KNOWN_HOSTS}" >> ~/.ssh/known_hosts | |
echo "${DEPLOY_KEY}" > ~/.ssh/my_rsync_key | |
echo "IdentityFile ~/.ssh/my_rsync_key" >> ~/.ssh/config | |
chmod -R 700 ~/.ssh | |
- name: Rsync deployment | |
if: github.ref == 'refs/heads/bascht.com' | |
run: | | |
rsync -avz -e ssh --exclude=_ --delete public_html/ [email protected]:/var/www/virtual/bascht/bascht.com/ | |