Publish blog #30
This file contains hidden or 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: Publish blog | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| name: Deploy docs | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout master | |
| uses: actions/checkout@v4 | |
| - name: Create jekyll dirs | |
| run: mkdir .jekyll-cache _site | |
| - name: Build site | |
| run: make docker-build | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.GH_ACTION_IAM_ROLE_ARN }} | |
| aws-region: us-east-1 | |
| - name: Upload assets | |
| working-directory: _site | |
| run: aws s3 cp . s3://${{ secrets.S3_BUCKET_NAME }}/ --recursive | |
| - name: Invalidate CloudFront cache | |
| run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_ID }} --paths "/*" |