Skip to content

Merge pull request #366 from Exabyte-io/improvement/split-guide-refer… #90

Merge pull request #366 from Exabyte-io/improvement/split-guide-refer…

Merge pull request #366 from Exabyte-io/improvement/split-guide-refer… #90

Workflow file for this run

name: Update S3 deploy
on:
push:
branches:
- "main"
- "dev"
schedule:
- cron: "0 0 1 1 *"
workflow_dispatch:
jobs:
build:
name: Deploy docs
runs-on: ubuntu-24.04
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
lfs: true
submodules: true
- name: Set python 3 version
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.10"
- name: Build pages (legacy)
uses: Exabyte-io/action-mkdocs-build@main
- name: Build split sites
run: |
source venv/bin/activate
mkdocs build -f mkdocs-guide.yml -d site/guide
mkdocs build -f mkdocs-concepts.yml -d site/reference
mkdocs build -f mkdocs-dev.yml -d site/dev
- name: Deploy to Production (dev branch, old docs)
if: github.ref == 'refs/heads/dev'
uses: Reggionick/s3-deploy@04c48f45adfd7a34c66348cf9cd1b6cd117cc467 # v4.0.0
with:
folder: site
bucket: docs.mat3ra.com
bucket-region: ${{ secrets.S3_LOCATION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: /*
no-cache: true
private: true
- name: Deploy to Development (main branch, new docs)
if: github.ref == 'refs/heads/main'
uses: Reggionick/s3-deploy@04c48f45adfd7a34c66348cf9cd1b6cd117cc467 # v4.0.0
with:
folder: site
bucket: docs-new.mat3ra.com
bucket-region: ${{ secrets.S3_LOCATION_1 }}
dist-id: ${{ secrets.CLOUDFRONT_DEV_DISTRIBUTION_ID_1 }}
invalidation: /*
no-cache: true
private: true