Skip to content

Merge pull request #2 from Selleo/k1eu/recipes-part-1 #6

Merge pull request #2 from Selleo/k1eu/recipes-part-1

Merge pull request #2 from Selleo/k1eu/recipes-part-1 #6

Workflow file for this run

name: Deploy Guidebook
on:
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
environment:
name: production
url: https://guidebook.selleo.dev
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # caching pip dependencies
- run: make install
- run: make build
- name: Synchronize S3 Bucket
uses: jakejarvis/s3-sync-action@master
with:
args: --delete
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: eu-central-1
SOURCE_DIR: "docs/build" # does not use working-directory
DEST_DIR: sites/guide
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.CDN_ID }}
PATHS: "/*"
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}