|
1 |
| -# Sample workflow for building and deploying a Jekyll site to GitHub Pages |
2 | 1 | name: Docs deploy
|
3 | 2 |
|
4 | 3 | on:
|
5 |
| - # Runs on pushes targeting the default branch |
6 | 4 | push:
|
7 | 5 | branches: ["develop"]
|
8 |
| - |
9 |
| - # Allows you to run this workflow manually from the Actions tab |
10 | 6 | workflow_dispatch:
|
11 | 7 |
|
12 |
| -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
13 | 8 | permissions:
|
14 | 9 | contents: read
|
15 | 10 | pages: write
|
16 | 11 | id-token: write
|
17 | 12 |
|
18 |
| -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. |
19 |
| -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. |
20 | 13 | concurrency:
|
21 | 14 | group: "pages"
|
22 | 15 | cancel-in-progress: false
|
23 | 16 |
|
24 | 17 | jobs:
|
25 |
| - # Build job |
26 | 18 | build:
|
27 | 19 | runs-on: ubuntu-latest
|
28 | 20 | steps:
|
29 |
| - - name: Checkout |
| 21 | + - name: Checkout repository |
30 | 22 | uses: actions/checkout@v4
|
31 |
| - - name: Setup Pages |
32 |
| - uses: actions/configure-pages@v5 |
33 |
| - - name: Setup Ruby |
34 |
| - uses: ruby/setup-ruby@086ffb1a2090c870a3f881cc91ea83aa4243d408 # v1.161.0 |
35 |
| - with: |
36 |
| - ruby-version: '3.1' # Not needed with a .ruby-version file |
37 |
| - bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
38 |
| - cache-version: 0 # Increment this number if you need to re-download cached gems |
39 | 23 |
|
40 |
| - - name: Install Jekyll and Dependencies |
| 24 | + - name: Setup Python |
| 25 | + uses: actions/setup-python@v5 |
| 26 | + with: |
| 27 | + python-version: '3.x' |
| 28 | + |
| 29 | + - name: Install MkDocs and dependencies |
41 | 30 | run: |
|
42 | 31 | cd docs
|
43 |
| - bundle install |
44 |
| - bundle exec which jekyll # Debug: Check if Jekyll is installed |
45 |
| - |
46 |
| - - name: Setup Pages |
47 |
| - id: pages |
48 |
| - uses: actions/configure-pages@v5 |
49 |
| - - name: Build with Jekyll |
50 |
| - # Outputs to the './_site' directory by default |
51 |
| - # Sample workflow for building and deploying a Jekyll site to GitHub Pages |
52 |
| - run: cd docs && bundle exec jekyll build --destination ../_site |
53 |
| - env: |
54 |
| - JEKYLL_ENV: production |
| 32 | + pip install -r requirements.txt |
| 33 | + |
| 34 | + - name: Build MkDocs site |
| 35 | + run: | |
| 36 | + mkdocs build --site-dir site |
| 37 | + |
55 | 38 | - name: Upload artifact
|
56 |
| - # Automatically uploads an artifact from the './_site' directory by default |
57 | 39 | uses: actions/upload-pages-artifact@v3
|
58 | 40 | with:
|
59 |
| - path: _site |
60 |
| - |
61 |
| - # Deployment job |
| 41 | + path: site |
| 42 | + |
62 | 43 | deploy:
|
63 | 44 | environment:
|
64 | 45 | name: github-pages
|
|
0 commit comments