Skip to content

Commit

Permalink
Add workflows to test and deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Aug 5, 2021
1 parent cde0e4f commit e0352d5
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,50 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPY_API_TOKEN }}

docs:
runs-on: ubuntu-latest
needs:
- deploy

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2.2.2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-optional.txt
pip install -e .
pip install -r requirements-docs.txt
- name: Generate changelog
uses: charmixer/auto-changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
exclude_labels: dependencies

- name: Commit files
run: |
git config --local user.email "feedback@materialsproject.org"
git config --local user.name "materialsproject"
mv CHANGELOG.md docs/
git add docs/CHANGELOG.md && git commit -m 'Updated CHANGELOG.md'
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: mkdocs build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
19 changes: 19 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,22 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2.2.2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r requirements-optional.txt
pip install -r requirements-docs.txt
- name: Build
run: mkdocs build

0 comments on commit e0352d5

Please sign in to comment.