rename job #4
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: CI Docs | |
on: | |
push: # Run on pushes to the default branch | |
branches: [main, docs_job] | |
pull_request_target: # Also run on pull requests originated from forks | |
branches: [main, docs_job] | |
release: | |
types: ['published'] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
Deploy-Pages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
architecture: "x64" | |
- name: Install packages and dependencies | |
run: pip install hatch | |
- name: Deploy Docs | |
run: | | |
git config user.name "Pankaj Singh" | |
git config user.email "[email protected]" | |
if [[ $GITHUB_EVENT_NAME == "release" && $GITHUB_EVENT_ACTION == "published" ]]; then | |
hatch run docs:gh_release | |
else | |
hatch run docs:gh_deploy | |
fi |