Ajouter .gitea/workflows/production.yaml
All checks were successful
Staging / build_and_deploy_staging (push) Successful in 10s
Production / build_and_deploy_prod (push) Successful in 9s

This commit is contained in:
Mathieu Broillet 2023-07-04 12:32:24 +00:00
parent 9f60ce6fb7
commit bebe52f22e

View File

@ -0,0 +1,38 @@
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