forked from ADORSYS-GIS/mk-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 1.01 KB
/
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
name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- master # Trigger workflow only on pushes to the master branch
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout the repository code
- name: Checkout code
uses: actions/checkout@v3
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Install dependencies (MkDocs and Material theme)
- name: Install dependencies
run: |
sudo apt install mkdocs-bootstrap
# Build and deploy the site to GitHub Pages
- name: Deploy to GitHub Pages
run: |
# sed -i -E "s/marc-jr/${{github.repository_owner}}/g" ./README.md
# sed -i -E "s/my-mkdocs-project/${{github.repository}}/g" ./README.md
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/marc-jr/mk-docs.git
mkdocs gh-deploy --force