-
-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (75 loc) · 2.44 KB
/
Copy pathdocs.yml
File metadata and controls
93 lines (75 loc) · 2.44 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
# Build the Astro site and Material documentation as one Pages artifact.
name: Docs
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/checkout@v7
with:
repository: willtheorangeguy/mkdocs
path: .mkdocs-shared
- uses: pnpm/action-setup@v6.0.9
with:
version: 9
- uses: actions/setup-node@v7
with:
node-version: '22'
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- uses: actions/setup-python@v7
with:
python-version: '3.12'
cache: pip
cache-dependency-path: .mkdocs-shared/shared/requirements-docs.txt
- name: Install dependencies
run: |
pnpm install
pip install -r .mkdocs-shared/shared/requirements-docs.txt
- name: Create environment file
run: echo "PUBLIC_UNSPLASH_ACCESS_KEY=${{ secrets.UNSPLASH_ACCESS_KEY }}" > .env
- name: Configure Pages
id: pages
uses: actions/configure-pages@v6
- name: Build Storybook style guide
run: pnpm storybook:build
- name: Build Astro site
run: |
pnpm astro build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
- name: Stage documentation design system
run: |
mkdir -p docs/stylesheets docs/javascript docs/images overrides/.icons
cp -r .mkdocs-shared/design-system/stylesheets/. docs/stylesheets/
cp -r .mkdocs-shared/design-system/javascript/. docs/javascript/
cp -rn .mkdocs-shared/design-system/overrides/. overrides/ || true
cp -rn .mkdocs-shared/design-system/icons/. overrides/.icons/ || true
cp -n .mkdocs-shared/design-system/images/favicon.svg docs/images/favicon.svg || true
- name: Build documentation
run: mkdocs build --strict --site-dir dist/docs
- uses: actions/upload-pages-artifact@v5
with:
path: dist/
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v5