Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
.github/workflows/build-blog.yml
# .github/workflows/build-blog.yml
#
name: Build & Publish blog
on:
push:
branches: [ master ]
jobs:
build-blog:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Dependencies with Pip
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Make Publish
run: |
make publish
- name: Sync S3
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: 'output'
run: |
aws s3 sync --acl private --delete $SOURCE_DIR s3://$AWS_S3_BUCKET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment