Skip to content

Commit

Permalink
updated docs .yml
Browse files Browse the repository at this point in the history
  • Loading branch information
n-claes committed Sep 22, 2021
1 parent 8af4bf7 commit c738b85
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,33 @@ name: docs

on:
push:
branches: [ docs/devdocs ]
branches: [ master, develop ]
pull_request:
branches: [ master, develop]

jobs:
develop:
doc:
if: github.ref == 'refs/heads/master' || github.base_ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || github.base_ref == 'refs/heads/develop'
name: '${{ matrix.name }}'
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
include:
- name: develop
branchname: develop
repository: n-claes/legolas.science-dev
cname: dev.legolas.science

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install build dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ford graphviz
Expand All @@ -26,15 +39,16 @@ jobs:
- name: Generate documentation
run: |
cd docs
python generate_docs.py develop
python generate_docs.py ${{ matrix.name }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/${{ matrix.branchname }}'
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: n-claes/legolas.science-dev
external_repository: ${{ matrix.repository }}
publish_branch: main
publish_dir: ./docs
cname: dev.legolas.science
cname: ${{ matrix.cname }}
enable_jekyll: true
full_commit_message: "dev: deploy n-claes/legolas@${{ github.sha }}"
full_commit_message: '${{ matrix.name }}: deploy n-claes/legolas@${{ github.sha }}'

0 comments on commit c738b85

Please sign in to comment.