-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (50 loc) · 1.53 KB
/
mkdocs_build.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build ION Documentation With Mkdocs
on:
push:
branches:
- ION-documentation # Set this to your default branch
paths:
- 'gh-pages/**' # Trigger only when changes in gh-pages directory
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify the Python version
- name: Set up Perl environment
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.32'
- name: Check and Install pod2markdown
run: |
if ! command -v pod2markdown &> /dev/null
then
echo "pod2markdown could not be found, installing..."
cpanm Pod::Markdown
else
echo "pod2markdown is already installed."
fi
- name: Run convert ION pod files to MD
run: |
cd gh-pages/docs
chmod +x ./convert-pod-to-md.sh
./convert-pod-to-md.sh
- name: Install dependencies
run: |
cd gh-pages # Change to the MkDocs directory
python -m pip install --upgrade pip
pip install mkdocs
pip install mkdocs-material
- name: Build MkDocs site
run: |
cd gh-pages # Ensure we're in the right directory
mkdocs build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages/site # Replace with your build directory