Remove specified AWS credentials in actions #36
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: ci | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: eu-west-2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y \ | |
build-essential \ | |
libcairo2-dev \ | |
libpango1.0-dev | |
- name: Download font package | |
run: | | |
wget https://github.com/mishamyrt/Lilex/releases/download/2.200/Lilex.zip | |
unzip Lilex.zip -d Lilex | |
sudo cp Lilex/ttf/* /usr/local/share/fonts | |
- name: Build Site | |
run: | | |
yarn install | |
yarn build | |
- name: Copy files to S3 | |
run: | | |
cd build/ | |
aws s3 sync . s3://${{ secrets.AWS_S3_BUCKET_NAME }} | |
- name: Invalidate CloudFront Cache | |
run: | | |
aws cloudfront create-invalidation \ | |
--distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} \ | |
--paths "/*" |