Skip to content

Merge pull request #53 from Calindra/feat/discord-community #52

Merge pull request #53 from Calindra/feat/discord-community

Merge pull request #53 from Calindra/feat/discord-community #52

Workflow file for this run

name: English - Deploy To S3
on:
push:
branches:
- master
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials And Build
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: pip install mkdocs-exclude-search
- run: pip install mkdocs-glightbox
- run: pip install mkdocs-awesome-pages-plugin
- run: pip install mkdocs-with-pdf
- run: pip install mkdocs-redirects
- run: bash -c 'cd en && mkdocs build'
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy static site to S3 bucket
run: aws s3 sync ./en/site/ s3://docs.eitri.tech/en --delete
# Novo passo para invalidar o cache do CloudFront
- name: Invalidate CloudFront cache
run: aws cloudfront create-invalidation --distribution-id E3TLZV8VLD19BP --paths "/*"
- name: Checkout
uses: actions/checkout@v1