Skip to content

Instantly share code, notes, and snippets.

@radupotop
Last active February 6, 2022 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save radupotop/7d8b4a4a7894b9c72b19571c1b6cc707 to your computer and use it in GitHub Desktop.
Save radupotop/7d8b4a4a7894b9c72b19571c1b6cc707 to your computer and use it in GitHub Desktop.
.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