Skip to content

Merge pull request #18 from sanjay-ba/main #41

Merge pull request #18 from sanjay-ba/main

Merge pull request #18 from sanjay-ba/main #41

Workflow file for this run

name: Deploy Knoxctl's webpage to S3
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.111.3'
extended: true
- name: Build Hugo Site
run: hugo --minify
- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_DEV_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.AWS_DEV_SECRET_ID }}
aws-region: us-east-2
- name: Deploy to S3
run: |
aws s3 sync ./public s3://www.knoxctlwebsite.accuknox.com --delete --debug
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
PATHS: "/*"