-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (96 loc) · 3.04 KB
/
pages.yml
File metadata and controls
118 lines (96 loc) · 3.04 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Check out Freenit source repository
uses: actions/checkout@v4
with:
repository: freenit-framework/devops
path: freenit
- name: Debug Freenit checkout
run: |
pwd
find . -maxdepth 3 -type d | sort
find freenit -maxdepth 3 -type d | sort || true
- name: Download Freenit service repositories
working-directory: freenit
run: ./bin/download_repos.sh
- name: Force designer branch
working-directory: freenit/services/designer
run: |
git checkout main
git pull --ff-only origin main
- name: Verify designer checkout
run: |
git -C freenit/services/designer branch --show-current
git -C freenit/services/designer log --oneline -n 3
find freenit/services -maxdepth 2 -type d | sort || true
test -d freenit/services/designer
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
pip install \
mkdocs \
mkdocs-material \
mkdocs-awesome-pages-plugin \
pymdown-extensions
- name: Install designer dependencies
working-directory: freenit/services/designer
run: npm ci
- name: Generate designer components
working-directory: freenit/services/designer
run: OFFLINE=yes ./bin/components.sh
- name: Build designer
working-directory: freenit/services/designer
run: npm run build
- name: Build site
run: mkdocs build --strict
- name: Add designer to published site
run: |
echo "designer/build contents:"
find freenit/services/designer/build -maxdepth 2 -type f | sort || true
mkdir -p site/design
cp -R freenit/services/designer/build/. site/design/
touch site/.nojekyll
echo "site/design contents:"
find site/design -maxdepth 2 -type f | sort || true
- name: Verify published designer files
run: |
find site/design -maxdepth 2 -type f | sort
test -f site/design/index.html
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4