mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-12-04 08:34:24 -06:00
Compare commits
1 Commits
f6377fce13
...
989c8b7eac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
989c8b7eac |
56
.github/workflows/release-book-website.yml
vendored
56
.github/workflows/release-book-website.yml
vendored
@@ -65,16 +65,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd /app/book
|
cd /app/book
|
||||||
make -j -O bake
|
make -j -O bake
|
||||||
- name: Copy book to downloads server
|
- name: Release baked book to S3
|
||||||
uses: burnett01/rsync-deployments@7.0.2
|
uses: shallwefootball/s3-upload-action@master
|
||||||
with:
|
with:
|
||||||
switches: "-avzr"
|
aws_key_id: ${{ secrets.AWS_KEY_ID }}
|
||||||
remote_host: ${{ secrets.SSH_HOST }}
|
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
|
||||||
remote_user: ${{ secrets.SSH_USERNAME }}
|
aws_bucket: ${{ secrets.AWS_BUCKET_BOOK }}
|
||||||
remote_key: ${{ secrets.SSH_KEY }}
|
source_dir: book/release
|
||||||
path: "book/release/*"
|
destination_dir: release
|
||||||
remote_path: "~/downloads/the-sourdough-framework/"
|
- name: Upload book Artifacts
|
||||||
- name: Upload book artifacts to GitHub
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: books
|
name: books
|
||||||
@@ -82,17 +81,36 @@ jobs:
|
|||||||
book/book_serif/book.log
|
book/book_serif/book.log
|
||||||
book/book_serif/book.pdf
|
book/book_serif/book.pdf
|
||||||
book/book-epub/book.epub
|
book/book-epub/book.epub
|
||||||
- name: Copy website to downloads server
|
- name: Release baked website to S3
|
||||||
uses: burnett01/rsync-deployments@7.0.2
|
uses: shallwefootball/s3-upload-action@master
|
||||||
with:
|
with:
|
||||||
switches: "-avzr --delete"
|
aws_key_id: ${{ secrets.AWS_KEY_ID }}
|
||||||
remote_host: ${{ secrets.SSH_HOST }}
|
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
|
||||||
remote_user: ${{ secrets.SSH_USERNAME }}
|
aws_bucket: ${{ secrets.AWS_BUCKET_WEBSITE }}
|
||||||
remote_key: ${{ secrets.SSH_KEY }}
|
source_dir: website/static_website_html
|
||||||
path: "website/static_website_html/*"
|
destination_dir: static_html_root
|
||||||
remote_path: "~/the-sourdough-framework/"
|
- name: Upload website Artifacts
|
||||||
- name: Upload website artifacts to GitHub
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: website
|
name: website
|
||||||
path: website/static_website_html
|
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 }}
|
||||||
|
|||||||
4
.github/workflows/test-book-website.yml
vendored
4
.github/workflows/test-book-website.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd /app/book
|
cd /app/book
|
||||||
make -j -O serif ebook website
|
make -j -O serif ebook website
|
||||||
- name: Upload book artifacts to GitHub
|
- name: Upload book Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: books
|
name: books
|
||||||
@@ -49,7 +49,7 @@ jobs:
|
|||||||
book/book_serif/book.log
|
book/book_serif/book.log
|
||||||
book/book_serif/book.pdf
|
book/book_serif/book.pdf
|
||||||
book/book-epub/book.epub
|
book/book-epub/book.epub
|
||||||
- name: Upload website artifacts to GitHub
|
- name: Upload website Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: website
|
name: website
|
||||||
|
|||||||
Reference in New Issue
Block a user