-
Notifications
You must be signed in to change notification settings - Fork 28
45 lines (40 loc) · 1.23 KB
/
github_page_deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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@v4
- 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