Skip to content

Commit

Permalink
Test doc build [build:glaciers] (#126)
Browse files Browse the repository at this point in the history
* Test doc build [build:glaciers]

* Wait later

* Fix name [build:glaciers]

* Fix build [build:glaciers]

* build:website_dev

* Clean up build [build:website_dev]

* Final cleanup
  • Loading branch information
philippjfr authored Dec 29, 2020
1 parent e198d3f commit 95ea711
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 24 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,42 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: "100"
- uses: actions/setup-python@v2
with:
python-version: 3.7
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow
- name: set DIR
- name: check project
id: vars
run: |
MSG="${{ github.event.head_commit.message }}"
MSG="${MSG##*build:}"
echo "::set-output name=DIR::${MSG%%]*}"
DIR="${MSG%%]*}"
echo "::set-output name=DIR::$DIR"
if [ -e ./$DIR ]; then
PROJECT_EXISTS=true
else
PROJECT_EXISTS=false
fi
echo "::set-output name=PROJECT_EXISTS::$PROJECT_EXISTS}"
- name: conda setup
if: steps.vars.outputs.PROJECT_EXISTS == 'true'
run: |
eval "$(conda shell.bash hook)"
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
- name: build project
if: steps.vars.outputs.PROJECT_EXISTS == 'true'
run: |
eval "$(conda shell.bash hook)"
DIR=${{ steps.vars.outputs.DIR }}
doit archive_project --name $DIR
anaconda-project prepare --directory $DIR
source activate $DIR/envs/default && pip install pyctdev
conda install -y "pyviz/label/dev::nbsite>=0.6.5" holoviews sphinx_pyviz_theme selenium phantomjs nomkl
conda install -y "pyviz/label/dev::nbsite>=0.6.5" holoviews sphinx_pyviz_theme selenium phantomjs nomkl "nbconvert<6.0"
conda install 'conda-forge::lxml'
doit build_project --name $DIR
- name: deploy project
if: steps.vars.outputs.PROJECT_EXISTS == 'true'
run: |
DIR=${{ steps.vars.outputs.DIR }}
git config user.email "[email protected]"
Expand Down
35 changes: 19 additions & 16 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ jobs:
if: "contains(github.event.head_commit.message, 'build:') || github.ref == 'refs/heads/master'"
steps:
- uses: actions/checkout@v2
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
Expand All @@ -36,7 +31,13 @@ jobs:
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
conda install -y -c pyviz/label/dev "nbsite>=0.6.5" sphinx_pyviz_theme lxml pyyaml holoviews nomkl
conda install -y -c pyviz/label/dev "nbsite>=0.6.5" sphinx_pyviz_theme lxml pyyaml holoviews nomkl "parso>=0.8,<0.9"
- name: Wait for build to succeed
uses: fountainhead/[email protected]
if: "contains(github.event.head_commit.message, 'build:')"
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: "Build project with Python 3.7"
- name: checkout evaluated
run: |
git checkout -b deploy-${GITHUB_REF#refs/*/}
Expand All @@ -49,18 +50,20 @@ jobs:
doit build_website
doit index_symlinks
- name: Deploy dev
uses: peaceiris/actions-gh-pages@v3
uses: crazy-max/ghaction-github-pages@v2
if: "!contains(github.event.head_commit.message, 'website_release')"
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: pyviz-dev/examples
publish_dir: ./builtdocs
force_orphan: true
repo: pyviz-dev/examples
build_dir: ./builtdocs
jekyll: false
env:
GH_PAT: ${{ secrets.ACCESS_TOKEN }}
- name: Deploy main
uses: crazy-max/ghaction-github-pages@v2
if: "contains(github.event.head_commit.message, 'website_release')"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./builtdocs
cname: examples.pyviz.org
force_orphan: true
build_dir: ./builtdocs
fqdn: examples.pyviz.org
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 95ea711

Please sign in to comment.