blog/.gitea/workflows/production.yaml

38 lines
917 B
YAML
Raw Permalink Normal View History

name: Production
on:
push:
tags:
- '*'
jobs:
build_and_deploy_prod:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: https://github.com/actions/checkout@v3
- name: Install hugo
run: |
apt-get update -y
apt-get install hugo -y
- name: Init submodules
run: git submodule update --init
- name: Check Hugo version
run: hugo version
- name: Build production
run: hugo --gc --minify -b https://blog.broillet.ch/
- name: Copy (scp) prod build to blog server
uses: https://github.com/garygrossgarten/github-action-scp@release
with:
local: 'public'
remote: /var/www/html/prod
host: ${{ secrets.SSH_HOSTNAME }}
username: 'root'
privateKey : ${{ secrets.SSH_KEY }}
rmRemote: true
dotfiles: true