simplify readme 1/n #82
Workflow file for this run
This file contains 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: "Build (& deploy) Docs" | |
on: | |
push: | |
branches: [main] | |
pull_request: {} | |
workflow_dispatch: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-docs: | |
uses: Lightning-AI/utilities/.github/workflows/[email protected] | |
with: | |
python-version: "3.10" | |
requirements-file: "requirements/docs.txt" | |
install-tex: true | |
deploy-docs: | |
# https://github.com/marketplace/actions/deploy-to-github-pages | |
needs: build-docs | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
# If you're using actions/checkout@v4 you must set persist-credentials to false in most cases for the deployment to work correctly. | |
persist-credentials: false | |
- uses: actions/download-artifact@v3 | |
with: | |
name: docs-html-${{ github.sha }} | |
path: docs/build/ | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages # The branch the action should deploy to. | |
folder: docs/build/html # The folder the action should deploy. | |
clean: true # Automatically remove deleted files from the deploy branch | |
target-folder: docs # If you'd like to push the contents of the deployment folder into a specific directory | |
single-commit: true # you'd prefer to have a single commit on the deployment branch instead of full history |