mziesel.com/.gitea/workflows/hugo.yaml

29 lines
872 B
YAML
Raw Normal View History

2023-06-12 18:29:31 +00:00
on:
push:
2023-06-13 17:16:53 +00:00
branches:
2023-06-13 17:22:12 +00:00
- main
2023-06-13 17:16:53 +00:00
pull_request:
2023-06-12 18:29:31 +00:00
jobs:
2023-06-13 17:16:53 +00:00
deploy:
2023-06-12 18:29:31 +00:00
runs-on: ubuntu-latest
steps:
2023-06-13 17:16:53 +00:00
- uses: actions/checkout@v3
2023-06-12 18:29:31 +00:00
with:
2023-06-13 17:16:53 +00:00
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
2023-06-12 20:15:41 +00:00
2023-06-13 17:16:53 +00:00
- name: Setup Hugo
uses: https://github.com/peaceiris/actions-hugo@v2
2023-06-12 18:29:31 +00:00
with:
2023-06-13 17:16:53 +00:00
hugo-version: '0.111.3'
# extended: true
2023-06-12 18:29:31 +00:00
2023-06-13 17:22:12 +00:00
- name: Build site
2023-06-13 17:16:53 +00:00
run: hugo --minify
2023-06-14 17:35:38 +00:00
2023-07-08 18:24:22 +00:00
- name: Setup Minio client
2023-07-08 18:20:06 +00:00
run: wget https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x ./mc && ./mc alias set deploy ${{ secrets.S3_ENDPOINT }} ${{ secrets.S3_ACCESS_KEY }} ${{ secrets.S3_SECRET_KEY }}
2023-07-08 18:18:37 +00:00
2023-06-14 15:08:43 +00:00
- name: Deploy to Garage
2023-07-08 18:24:22 +00:00
run: ./mc mirror --remove --overwrite ./public/ deploy/${{ secrets.S3_BUCKET }}