|
| 1 | +name: Publish docs via GitHub Pages |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + name: Deploy docs |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Checkout main |
| 16 | + uses: actions/checkout@v2 |
| 17 | + |
| 18 | + - name: Set up Python |
| 19 | + uses: actions/setup-python@v2 |
| 20 | + with: |
| 21 | + python-version: '3.x' |
| 22 | + |
| 23 | + - name: Install dependencies |
| 24 | + run: | |
| 25 | + python -m pip install --upgrade pip |
| 26 | + pip install -r requirements.txt |
| 27 | +
|
| 28 | + - name: Generate changelog |
| 29 | + run: python3 scripts/changelog.py |
| 30 | + |
| 31 | + - name: Build MkDocs site |
| 32 | + run: mkdocs build |
| 33 | + |
| 34 | + - name: Copy README to docs/index.md |
| 35 | + run: cp README.md docs/index.md |
| 36 | + |
| 37 | + - name: Copy CONTRIBUTING to docs/contribute.md |
| 38 | + run: cp CONTRIBUTING.md docs/contribute.md |
| 39 | + |
| 40 | + - name: Copy CHANGELOG to docs/release-notes.md |
| 41 | + run: cp CHANGELOG.md docs/release-notes.md |
| 42 | + |
| 43 | + - name: Deploy to GitHub Pages |
| 44 | + run: mkdocs gh-deploy |
| 45 | + env: |
| 46 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + |
| 48 | +# name: Publish docs via GitHub Pages |
| 49 | +# on: |
| 50 | +# push: |
| 51 | +# branches: |
| 52 | +# - main |
| 53 | + |
| 54 | +# jobs: |
| 55 | +# build: |
| 56 | +# name: Deploy docs |
| 57 | +# runs-on: ubuntu-latest |
| 58 | +# steps: |
| 59 | +# - name: Checkout main |
| 60 | +# uses: actions/checkout@v2 |
| 61 | + |
| 62 | +# - name: Deploy docs |
| 63 | +# uses: mhausenblas/mkdocs-deploy-gh-pages@master |
| 64 | +# # Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme |
| 65 | +# env: |
| 66 | +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 67 | +# CUSTOM_DOMAIN: optionaldomain.com |
| 68 | +# CONFIG_FILE: folder/mkdocs.yml |
| 69 | +# EXTRA_PACKAGES: build-base |
| 70 | +# # GITHUB_DOMAIN: github.myenterprise.com |
| 71 | +# REQUIREMENTS: folder/requirements.txt |
0 commit comments