| # Builds the website sourced from docs/website/ using `mkdocs` and pushes |
| # to the gh-pages branch for publishing on GitHub Pages. |
| # See https://squidfunk.github.io/mkdocs-material/publishing-your-site/ |
| working-directory: docs/website |
| # Don't run this in everyone's forks. |
| if: github.repository == 'google/iree' |
| - name: Checkout out repository |
| uses: actions/checkout@v2 |
| token: ${{ secrets.WRITE_ACCESS_TOKEN }} |
| - name: Fetching base gh-pages branch |
| # We have to explicitly fetch the gh-pages branch as well to preserve history |
| run: git fetch --no-tags --prune --depth=1 origin "gh-pages:gh-pages" |
| - name: Setting up Python |
| uses: actions/setup-python@v2 |
| - name: Installing Material for MkDocs |
| run: pip install mkdocs-material |
| - name: Setting git config |
| git config --local user.email "iree-github-actions-bot@google.com" |
| git config --local user.name "Website Publish Action" |
| - name: Deploying to gh-pages |