6 Commits

Author SHA1 Message Date
Hendrik Kleinwaechter
cef0d9c8f7 Rename action & final cleanups
Some checks failed
Release the book and website / build-and-push-image (push) Has been cancelled
Release the book and website / release-book-website (push) Has been cancelled
2025-03-14 13:12:24 +01:00
Hendrik Kleinwaechter
656404782a Update website deployment script 2025-03-14 13:01:45 +01:00
Hendrik Kleinwaechter
ea75a1ac8a switch to rsync 2025-03-14 12:37:19 +01:00
Hendrik Kleinwaechter
9e4e03bcfa Attempt #2 2025-03-14 12:24:37 +01:00
Hendrik Kleinwaechter
b783b1e274 Fix 2025-03-14 12:12:04 +01:00
Hendrik Kleinwaechter
fb5f526b2f Begin migration away from S3 and Cloudfront 2025-03-14 12:10:32 +01:00
2 changed files with 21 additions and 39 deletions

View File

@@ -65,15 +65,16 @@ jobs:
run: |
cd /app/book
make -j -O bake
- name: Release baked book to S3
uses: shallwefootball/s3-upload-action@master
- name: Copy book to downloads server
uses: burnett01/rsync-deployments@7.0.2
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: ${{ secrets.AWS_BUCKET_BOOK }}
source_dir: book/release
destination_dir: release
- name: Upload book Artifacts
switches: "-avzr"
remote_host: ${{ secrets.SSH_HOST }}
remote_user: ${{ secrets.SSH_USERNAME }}
remote_key: ${{ secrets.SSH_KEY }}
path: "book/release/*"
remote_path: "~/downloads/the-sourdough-framework/"
- name: Upload book artifacts to GitHub
uses: actions/upload-artifact@v4
with:
name: books
@@ -81,36 +82,17 @@ jobs:
book/book_serif/book.log
book/book_serif/book.pdf
book/book-epub/book.epub
- name: Release baked website to S3
uses: shallwefootball/s3-upload-action@master
- name: Copy website to downloads server
uses: burnett01/rsync-deployments@7.0.2
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: ${{ secrets.AWS_BUCKET_WEBSITE }}
source_dir: website/static_website_html
destination_dir: static_html_root
- name: Upload website Artifacts
switches: "-avzr --delete"
remote_host: ${{ secrets.SSH_HOST }}
remote_user: ${{ secrets.SSH_USERNAME }}
remote_key: ${{ secrets.SSH_KEY }}
path: "website/static_website_html/*"
remote_path: "~/the-sourdough-framework/"
- name: Upload website artifacts to GitHub
uses: actions/upload-artifact@v4
with:
name: website
path: website/static_website_html
invalidate-book-website-cache:
needs: release-book-website
runs-on: ubuntu-latest
steps:
- name: Invalidate Cloudfront book cache
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION_BOOK }}
PATHS: "/*"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Invalidate Cloudfront website cache
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION_WEBSITE }}
PATHS: "/*"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
path: website/static_website_html

View File

@@ -41,7 +41,7 @@ jobs:
run: |
cd /app/book
make -j -O serif ebook website
- name: Upload book Artifacts
- name: Upload book artifacts to GitHub
uses: actions/upload-artifact@v4
with:
name: books
@@ -49,7 +49,7 @@ jobs:
book/book_serif/book.log
book/book_serif/book.pdf
book/book-epub/book.epub
- name: Upload website Artifacts
- name: Upload website artifacts to GitHub
uses: actions/upload-artifact@v4
with:
name: website