3737 packages-dir : ./${{ matrix.package }}/dist/
3838
3939 docs :
40+ if : github.repository_owner == 'materialsproject' && github.ref == 'refs/heads/main'
41+ environment :
42+ name : github-pages
43+ url : ${{ steps.deployment.outputs.page_url }}
4044 runs-on : ubuntu-latest
4145 needs :
4246 - deploy
@@ -63,31 +67,24 @@ jobs:
6367 python${{ matrix.python-version }} -m pip install --user `grep numpy emmet-api/requirements/${{ matrix.os }}_py${{ matrix.python-version }}_extras.txt`
6468 python${{ matrix.python-version }} -m piptools sync --user emmet-api/requirements/${{ matrix.os }}_py${{ matrix.python-version }}_extras.txt
6569
66- - name : Generate changelog
67- uses : charmixer/auto-changelog-action@v1
68- with :
69- token : ${{ secrets.GITHUB_TOKEN }}
70- exclude_labels : dependencies
71-
72- - name : Commit files
73- run : |
74- git config --local user.email "feedback@materialsproject.org"
75- git config --local user.name "materialsproject"
76- git stash
77- git pull origin main
78- mv CHANGELOG.md docs/
79- git add docs/CHANGELOG.md && git commit -m 'Updated CHANGELOG.md'
80-
81- - name : Push changes
82- uses : ad-m/github-push-action@master
83- with :
84- github_token : ${{ secrets.GITHUB_TOKEN }}
70+ # TODO: To install graphiz and therefore use erdantic to draw pydantic models:
71+ # - name: Install graphviz
72+ # run: |
73+ # # Required to generate entity-relationship diagrams for pydantic with erdantic
74+ # # mac users should `brew install graphviz`, then
75+ # # `CC=gcc CPPFLAGS="-I$(brew --prefix graphviz)/include" LDFLAGS="-L$(brew --prefix graphviz)/lib" pip install pygraphviz`
76+ # # See: https://github.com/pygraphviz/pygraphviz/issues/572
77+ # sudo apt install graphviz
78+ # sudo apt install graphviz-dev
8579
8680 - name : Build
87- run : mkdocs build
81+ run : sphinx- build docs docs/_build
8882
89- - name : Deploy
90- uses : peaceiris/ actions-gh- pages@v4.0.0
83+ - name : Upload build artifact
84+ uses : actions/upload- pages-artifact@v3
9185 with :
92- github_token : ${{ secrets.GITHUB_TOKEN }}
93- publish_dir : ./site
86+ path : ./docs/_build
87+
88+ - name : Deploy to GitHub Pages
89+ id : deployment
90+ uses : actions/deploy-pages@v4
0 commit comments