Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Nickelsen committed Aug 29, 2023
1 parent e868584 commit 5c205f6
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,19 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: ./build.sh
#- run: ./deploy.sh
- name: Build
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jekyll/jekyll:3.8 /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build"
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: Deploy
run: |
aws s3 sync _site/ s3://$BUCKET --content-type "text/html; charset=utf-8" --delete --cache-control "max-age=0" --exclude "*.sh"
aws s3 cp _site/assets/css/main-2019.css s3://$BUCKET/assets/css/main-2019.css --content-type="text/css"
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths /\*

0 comments on commit 5c205f6

Please sign in to comment.