Skip to content

Updated runs on (#202) #85

Updated runs on (#202)

Updated runs on (#202) #85

Workflow file for this run

name: Deploy MkDocs Site to S3
on:
push:
branches:
- main # Change this to your deployment branch
jobs:
deploy:
runs-on: org-openobserve-standard-4
permissions:
id-token: write
contents: read
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Install AWS CLI
run: |
if ! command -v aws &> /dev/null; then
echo "AWS CLI not found. Installing..."
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
else
echo "AWS CLI already installed."
fi
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::325553860333:role/GitHubActionsRole
aws-region: us-west-2 # or your preferred region
- name: Build MkDocs site
run: |
rm -rf site
mkdocs build
- name: Deploy to S3
run: |
aws s3 sync ./site s3://openobserve-website-prod/docs --exclude=".git/*"
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation --distribution-id EZ2SEJVXM7NXL --paths "/docs/*"