docs: Migrate documentation to Zensical. (#60) #52
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: Deploy documentation | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: Environment to deploy to. | |
| default: docs-dev | |
| required: true | |
| type: environment | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| name: Deploy Documentation to ${{ inputs.environment || 'docs-dev' }} | |
| environment: ${{ inputs.environment || 'docs-dev' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Copy assets from submodules | |
| run: rsync -av --progress */**/docs/assets/ docs/assets --exclude .git --exclude .idea --exclude docs | |
| - name: Set up AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ env.AWS_REGION || 'us-east-1' }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # 8.0.1 | |
| - name: Build documentation | |
| run: uv run --frozen zensical build | |
| - run: aws s3 sync ./site "s3://${{ env.DOCS_BUCKET || 'docs.dev.services.cfa.codes' }}/${{ env.PREFIX || 'tofu-modules' }}" |