-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to build the site and deploy with ltd-conveyor
- Loading branch information
1 parent
6a7b8c7
commit 705c8e6
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Python CI | ||
|
||
env: | ||
# Default Python version used for all jobs other than test, which uses a | ||
# matrix of supported versions. Quote the version to avoid interpretation as | ||
# a floating point number. | ||
PYTHON_VERSION: "3.12" | ||
|
||
"on": | ||
merge_group: {} | ||
pull_request: {} | ||
push: | ||
branches-ignore: | ||
# These should always correspond to pull requests, so ignore them for | ||
# the push trigger and let them be triggered by the pull_request | ||
# trigger, avoiding running the workflow twice. This is a minor | ||
# optimization so there's no need to ensure this is comprehensive. | ||
- "dependabot/**" | ||
- "gh-readonly-queue/**" | ||
- "renovate/**" | ||
- "tickets/**" | ||
- "u/**" | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
|
||
docs: | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # full history for setuptools_scm | ||
|
||
- name: Install Ruby and other prerequisites | ||
run: sudo apt-get install ruby-full build-essential zlib1g-dev | ||
|
||
- name: Install Jekyll | ||
run: gem install bundler jekyll | ||
|
||
- name: Build the schema browser site | ||
run: jekyll build | ||
|
||
# Only attempt documentation uploads for tagged releases and pull | ||
# requests from ticket branches in the same repository. This avoids | ||
# version clutter in the docs and failures when a PR doesn't have access | ||
# to secrets. | ||
- name: Upload to LSST the Docs | ||
uses: lsst-sqre/ltd-upload@v1 | ||
with: | ||
project: "sdm-schemas" | ||
dir: "_site" | ||
username: ${{ secrets.LTD_USERNAME }} | ||
password: ${{ secrets.LTD_PASSWORD }} | ||
if: > | ||
github.event_name != 'merge_group' | ||
&& (github.event_name != 'pull_request' | ||
|| startsWith(github.head_ref, 'tickets/')) |