Skip to content

Commit

Permalink
Merge pull request #445 from ReactionMechanismGenerator/docs
Browse files Browse the repository at this point in the history
Solve the GH pages deploy issue
  • Loading branch information
kspieks committed Feb 8, 2021
2 parents 52a8022 + b988f50 commit 18a0113
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/cont_int.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up miniconda Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: arc_env
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- name: Install dependencies
shell: bash -l {0}
run: |
Expand All @@ -26,6 +28,7 @@ jobs:
cd ..
git clone https://github.com/ReactionMechanismGenerator/RMG-Py
cd RMG-Py
export PYTHONPATH=$PYTHONPATH:$(pwd)
make
cd ..
git clone https://github.com/ReactionMechanismGenerator/RMG-database
Expand All @@ -35,6 +38,7 @@ jobs:
cd ..
echo $(pwd)
conda list
- name: Lint with flake8
shell: bash -l {0}
run: |
Expand All @@ -43,6 +47,7 @@ jobs:
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
python -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with nosetests
shell: bash -l {0}
run: |
Expand Down
59 changes: 35 additions & 24 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,47 @@ on:

jobs:
deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
- name: Set up miniconda Python 3.8
uses: conda-incubator/setup-miniconda@v2
with:
python-version: '3.8'
activate-environment: arc_env
environment-file: environment.yml
python-version: 3.8
auto-activate-base: false

- name: Upgrade pip
- name: Install dependencies and compile the docs
shell: bash -l {0}
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python3 -m pip install -r ./requirements.txt

- run: export PYTHONPATH=$PYTHONPATH:$(pwd); cd docs; make html
export PYTHONPATH=$PYTHONPATH:$(pwd)
conda activate arc_env
cd ..
git clone https://github.com/ReactionMechanismGenerator/RMG-Py
cd RMG-Py
export PYTHONPATH=$PYTHONPATH:$(pwd)
make
cd ..
git clone https://github.com/ReactionMechanismGenerator/RMG-database
cd ARC
echo $(pwd)
conda list
- name: Compile docs
shell: bash -l {0}
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
conda activate arc_env
cd ..
cd RMG-Py
export PYTHONPATH=$PYTHONPATH:$(pwd)
cd ..
cd ARC
cd docs
make html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.7.3
Expand Down

0 comments on commit 18a0113

Please sign in to comment.