Some checks failed
Build Site / build (pull_request) Has been cancelled
Forgejo Actions doesn't have all GitHub Actions in its data repository, so we need to reference the full GitHub URLs for actions like peaceiris/actions-hugo and aws-actions/configure-aws-credentials. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
37 lines
No EOL
932 B
YAML
37 lines
No EOL
932 B
YAML
name: Deploy to S3
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: https://github.com/actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Hugo
|
|
uses: https://github.com/peaceiris/actions-hugo@v3
|
|
with:
|
|
hugo-version: 'latest'
|
|
extended: true
|
|
|
|
- name: Build Hugo site
|
|
run: hugo --minify
|
|
|
|
- name: Configure AWS credentials
|
|
uses: https://github.com/aws-actions/configure-aws-credentials@v4
|
|
with:
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
aws-region: us-east-1
|
|
|
|
- name: Deploy to S3
|
|
run: |
|
|
aws s3 sync public/ s3://${{ secrets.S3_BUCKET_NAME }} --delete --no-cli-pager |