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
|
|
|
|
|
|
|
# - name: Create tarfile
|
|
|
|
# run: tar -cf website.tar public
|
|
|
|
#
|
|
|
|
# - name: Upload artifacts
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: website-files.tar
|
|
|
|
# path: website.tar
|
|
|
|
|
2023-06-14 15:08:43 +00:00
|
|
|
- name: Deploy to Garage
|
|
|
|
uses: https://github.com/mamal72/minio-perfect-deploy-action@main
|
|
|
|
with:
|
2023-06-18 17:53:53 +00:00
|
|
|
endpoint: ${{ secrets.S3_ENDPOINT }}
|
|
|
|
access_key: ${{ secrets.S3_ACCESS_KEY }}
|
|
|
|
secret_key: ${{ secrets.S3_SECRET_KEY }}
|
|
|
|
bucket: ${{ secrets.S3_BUCKET }}
|
2023-06-14 15:08:43 +00:00
|
|
|
source_dir: 'public'
|
|
|
|
target_dir: '/'
|