Skip to content

Bump aws-actions/aws-cloudformation-github-deploy from 2.0.0 to 2.1.0… #479

Bump aws-actions/aws-cloudformation-github-deploy from 2.0.0 to 2.1.0…

Bump aws-actions/aws-cloudformation-github-deploy from 2.0.0 to 2.1.0… #479

Workflow file for this run

name: Build and deploy the Vapor documentation
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
permissions:
contents: read
id-token: write
jobs:
deploy:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create virtual environment
run: python3 -m venv venv
- name: Install dependencies
run: venv/bin/pip install -r requirements.txt
- name: Build the website
run: |
venv/bin/mkdocs build
cp googlefc012e5d94cfa05f.html site/googlefc012e5d94cfa05f.html
swift setUpRedirects.swift
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
with:
role-to-assume: ${{ vars.OIDC_ROLE_ARN }}
aws-region: ${{ vars.OIDC_ROLE_REGION }}
- name: Deploy CloudFormation stack
uses: aws-actions/aws-cloudformation-github-deploy@64bde66a4001208fc0917038be8846d99c9d0585 # v2.1.0
with:
name: vapor-docs-stack
template: stack.yml
parameter-overrides: >-
DomainName=docs.vapor.codes,
S3BucketName=${{ secrets.DOCS_S3_BUCKET_NAME }},
AcmCertificateArn=${{ secrets.CERTIFICATE_ARN }}
- name: Upload data to S3
run: |
aws s3 sync ./site 's3://${{ secrets.DOCS_S3_BUCKET_NAME }}' --no-progress --acl public-read
- name: Invalidate CloudFront
run: |
aws cloudfront create-invalidation --distribution-id '${{ secrets.DOCS_DISTRIBUTION_ID }}' --paths '/*'