Ajouter .gitea/workflows/production.yaml
This commit is contained in:
parent
9f60ce6fb7
commit
bebe52f22e
38
.gitea/workflows/production.yaml
Normal file
38
.gitea/workflows/production.yaml
Normal 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
|
Loading…
Reference in New Issue
Block a user