Merge pull request #641 from pavel-synek/main #227
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
name: "Build and deploy" | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
name: "Build and deploy" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
- name: "Pull images" | |
run: docker-compose pull | |
- name: "Build" | |
run: docker-compose run --rm -e JEKYLL_ENV=production jekyll jekyll build | |
- name: "Deploy" | |
run: | | |
docker-compose run --rm -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY aws s3 rm s3://help.keboola.com --recursive --region us-east-1 | |
docker-compose run --rm -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY aws s3 cp _site s3://help.keboola.com --recursive --acl "public-read" --cache-control "max-age=600" --region us-east-1 |