Personal-Website/.gitea/workflows/build.yml
Ben Hays ba0708abfd
All checks were successful
Build Hugo Site / build (push) Successful in 15s
Build Hugo Site / deploy (push) Successful in 2s
Fix YAML Issue
2023-10-22 22:04:51 -04:00

31 lines
863 B
YAML

# .gitea/workflows/build.yaml
name: Build Hugo Site
run-name: Static Site Generation
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.114.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--minify
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to Server
run: scp public/* ${{ SCP_URL }}:/var/www/html/