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 }}