-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from sot/docs-workflow
added docs workflow
- Loading branch information
Showing
1 changed file
with
49 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,49 @@ | ||
--- | ||
name: Deploy Docs | ||
on: | ||
release: | ||
types: | ||
- created | ||
repository_dispatch: | ||
types: | ||
- build-docs | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: head | ||
name: Deploy Docs | ||
steps: | ||
- name: Fetch gh-pages | ||
uses: actions/checkout@v2 | ||
with: | ||
path: gh-pages | ||
ref: gh-pages | ||
- name: Fetch source | ||
uses: actions/checkout@v2 | ||
with: | ||
path: source | ||
- name: clear | ||
run: rm -fr gh-pages/docs/* | ||
- name: build | ||
run: | | ||
eval "$(/export/jgonzale/github-workflows/miniconda3-shiny/bin/conda shell.bash hook)" | ||
conda activate ska3-masters | ||
mkdir -p _static | ||
make html | ||
working-directory: source/docs | ||
env: | ||
PYTHONPATH: ${{ github.workspace }}/source | ||
GITHUB_API_TOKEN: ${{ secrets.CHANDRA_XRAY_TOKEN }} | ||
- name: copy | ||
run: cp -fr source/docs/_build/html/* gh-pages/docs | ||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v4 | ||
with: | ||
ref: "gh-pages" | ||
cwd: "gh-pages" | ||
author_name: Javier Gonzalez | ||
author_email: javierggt@yahoo.com | ||
message: "Deploy docs" | ||
add: "docs" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |