-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (75 loc) · 2.48 KB
/
interactdocs.yml
File metadata and controls
94 lines (75 loc) · 2.48 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
name: Deploy Docs to GitHub Pages
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
registry-url: https://registry.npmjs.org
- name: Enable Corepack
run: |
corepack enable
corepack prepare yarn@4.10.3 --activate
yarn set version 4.10.3
- name: Install dependencies
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NPQ_PKG_MGR=yarn npx npq install
- name: Build packages and landing page libs
run: ./scripts/build-landing.sh
- name: Build docs app
run: yarn workspace @wix/interact-docs build
env:
# Set base path for GitHub Pages deployment (absolute path for React Router compatibility)
VITE_BASE: /interact/docs/
- name: Setup Pages
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4
- name: Prepare deployment directory
run: |
# Create the site structure:
# / -> root index.html and assets
# /docs/ -> docs app
# /rules/ -> rules markdown files
mkdir -p _site/docs
mkdir -p _site/rules
mkdir -p _site/assets
# Copy root landing page and assets (includes assets/lib/ from build-landing.sh)
cp index.html _site/
cp -r assets/* _site/assets/
# Copy docs app
cp -r apps/docs/dist/* _site/docs/
# Copy rules from source (served at /rules/, not /docs/rules/)
cp -r packages/interact/rules/* _site/rules/
- name: Upload artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
with:
path: _site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4