Skip to content

diploy.yml file has editted and fixed .txt error #1

diploy.yml file has editted and fixed .txt error

diploy.yml file has editted and fixed .txt error #1

Workflow file for this run

name: Deploy Static Website to AWS S3 and CloudFront
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Python and MkDocs
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install MkDocs dependencies
run: |
pip install mkdocs mkdocs-material
- name: Build MkDocs site
run: mkdocs build
- name: Deploy to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync ./site s3://yarinakiva-dev-website2 --delete
- name: Invalidate CloudFront cache
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws cloudfront create-invalidation --distribution-id YOUR_DISTRIBUTION_ID --paths "/*"