better docs for save and load models (#480) #10
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: Docs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| paths: | |
| - docs/** | |
| - .github/workflows/docs.yml | |
| - requirements_dev.txt | |
| - setup.py | |
| - supervised/** | |
| pull_request: | |
| paths: | |
| - docs/** | |
| - .github/workflows/docs.yml | |
| - requirements_dev.txt | |
| - setup.py | |
| - supervised/** | |
| workflow_dispatch: | |
| concurrency: | |
| group: docs-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements_dev.txt | |
| pip install -e . | |
| - name: Build docs | |
| run: mkdocs build --strict -f docs/mkdocs.yml | |
| - name: Configure AWS credentials | |
| if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Deploy to S3 | |
| if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
| run: aws s3 sync docs/site/ s3://supervised.mljar.com --delete | |
| - name: Invalidate CloudFront | |
| if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
| run: aws cloudfront create-invalidation --distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" --paths "/*" |