blog/.gitea/workflows/build.yaml
Mathieu Broillet 499e8b6888
Some checks failed
Production / deploy (push) Failing after 4s
Actualiser .gitea/workflows/build.yaml
2023-07-03 14:36:08 +00:00

53 lines
1.3 KiB
YAML

name: Production
on:
push:
branches:
- main
jobs:
deploy:
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 staging
run: hugo --gc --minify --buildDrafts -b https://blog.broillet.ch/
- name: Copy (scp) staging build to blog server
uses: garygrossgarten/github-action-scp@release
with:
local: 'public'
remote: /var/www/html/staging
host: ${{ secrets.SSH_HOSTNAME }}
username: 'root'
privateKey : ${{ secrets.SSH_KEY }}
rmRemote: true
dotfiles: true
- name: Build production
run: hugo --gc --minify -b https://blog.broillet.ch/
- name: Copy (scp) prod build to blog server
uses: 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