-
-
Save tavy315/0687edc6b83308465bf3e68f684795ae to your computer and use it in GitHub Desktop.
.github/workflows/build-blog.yml
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
# .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