|
| 1 | +name: Deploy MkDocs files |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - 'docs/**' |
| 7 | + - 'mkdocs.yml' |
| 8 | + - 'themes/**' |
| 9 | + branches: |
| 10 | + - master |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + runs-on: [ubuntu-latest] |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + - name: Set up Python 3.8 |
| 18 | + uses: actions/setup-python@v1 |
| 19 | + with: |
| 20 | + python-version: 3.8 |
| 21 | + - name: Install dependencies |
| 22 | + run: | |
| 23 | + python -m pip install --upgrade pip setuptools |
| 24 | + python -m pip install -U -r requirements.txt |
| 25 | + - name: Deploy Files |
| 26 | + run: | |
| 27 | + git config user.name "github-actions[bot]" # We can use the Username and E-Mail of GitHub Actions for Git. |
| 28 | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 29 | + git remote add repo "https://github.com/mobile-coding-hub/mobile-coding-hub.github.io.git" |
| 30 | + git fetch repo && git fetch repo docs:docs |
| 31 | + python -m mkdocs gh-deploy --clean --remote-name repo |
| 32 | + git push repo master |
0 commit comments