gabrielsimmer.com/.forgejo/workflows/publish-posts.yml
Gabriel Simmer 6f43467cd7
All checks were successful
Publish posts / sync (push) Successful in 21s
Swap to native R2 messages over webhook
2024-04-03 23:21:07 +01:00

29 lines
849 B
YAML

name: Publish posts
on:
push:
paths:
- 'posts/**'
- '.forgejo/workflows/publish-posts.yml'
jobs:
sync:
runs-on: debian-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.5.3
with:
ref: trunk
- name: Install AWS CLI
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
- name: Sync with S3
run: |
aws s3 sync ./posts s3://gabrielsimmer-com/posts --endpoint-url=$AWS_ENDPOINT --size-only --delete --output text
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
AWS_DEFAULT_REGION: 'weur'
AWS_ENDPOINT: ${{ secrets.AWS_ENDPOINT }}