-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We push changes to s3, and not to Docker Hub.
- Loading branch information
Showing
3 changed files
with
38 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Build site and sync with S3 | ||
# To test this action with act (https://github.com/nektos/act) run: | ||
# act --secret ACADEMY_S3_ACCESS_KEY_ID=xxx --secret ACADEMY_S3_SECRET_ACCESS_KEY=xxx --secret ACADEMY_S3_REGION=xxx --secret ACADEMY_S3_BUCKET=xxx | ||
name: Deploy to S3 | ||
|
||
on: | ||
push: | ||
branches: [ master, main ] | ||
|
||
jobs: | ||
deploy_to_s3: | ||
name: Build and sync with S3 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Python requirements | ||
run: pip install -r requirements.txt | ||
|
||
- name: Install system requirements | ||
run: apt update && apt install -y pandoc | ||
|
||
- name: Build site | ||
run: make build | ||
|
||
# https://github.com/aws-actions/configure-aws-credentials?tab=readme-ov-file#assumerole-with-static-iam-credentials-in-repository-secrets | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.ACADEMY_S3_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.ACADEMY_S3_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.ACADEMY_S3_REGION }} | ||
|
||
- name: Sync build assets with S3 | ||
run: aws s3 sync --delete _build/academy/ s3://${{ secrets.ACADEMY_S3_BUCKET }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters