Skip to content

Merge pull request #267 from Boavizta/Orange-OpenSource-2-automate-th… #48

Merge pull request #267 from Boavizta/Orange-OpenSource-2-automate-th…

Merge pull request #267 from Boavizta/Orange-OpenSource-2-automate-th… #48

name: Publish docs via GitHub Pages
on:
push:
branches:
- main
paths:
- 'docs/**'
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v2
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_DOMAIN: doc.api.boavizta.org
CONFIG_FILE: docs/mkdocs.yml
EXTRA_PACKAGES: build-base
REQUIREMENTS: docs/requirements.txt
- name: change permissions
run: sudo chown -R $(whoami) .git
- name: set custom domain
run: |
git fetch origin gh-pages
git checkout gh-pages
echo 'doc.api.boavizta.org' > CNAME
git add CNAME
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "adding CNAME"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages