updated build version #7
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: AWS Sync | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Copy files to the s3 website content bucket | |
run: | |
aws s3 sync . s3://${{ secrets.AWS_S3_BUCKET_SIMPLE }} | |
- name: Cloudfront validation | |
uses: chetan/invalidate-cloudfront-action@master | |
env: | |
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION_PRODUCTION }} | |
PATHS: '/*' | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Send mail | |
if: always() | |
uses: dawidd6/action-send-mail@v2 | |
with: | |
# mail server settings | |
server_address: smtp.gmail.com | |
server_port: 465 | |
# user credentials | |
username: ${{ secrets.EMAIL_USERNAME }} | |
password: ${{ secrets.EMAIL_PASSWORD }} | |
# email subject | |
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }} | |
# email body as text | |
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }} | |
# comma-separated string, send email to | |
to: btopro@outlook.com,davidjfusco@gmail.com | |
# from email name | |
from: PSU CDN |