Merge branch 'main' of https://github.com/skyu-io/skyu-docs #31
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: Deploy SkyU.IO to Cloudfront | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
environment: | |
name: SkyU Documentation URL | |
url: https://docs.skyu.io | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_DEPLOY_SKYU_DOC_WEBSITE }} | |
aws-region: us-east-1 | |
- name: Install mkdocs-material | |
run: pip install mkdocs-material | |
- name: Install mkdocs-awesome-pages-plugin | |
run: pip install mkdocs-awesome-pages-plugin | |
- name: Build mkdocs-material | |
run: mkdocs build | |
- name: upload build file to the s3 bucket | |
run: aws s3 sync site s3://${{ secrets.S3_BUCKET_NAME }} --delete | |
- name: Invalidate CloudFront | |
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*" | |