Skip to content

Commit 20b6269

Browse files
committed
refactor: move language reference here
1 parent 0209eee commit 20b6269

121 files changed

Lines changed: 29378 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/sync-www.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Sync to WWW Repository
2+
3+
on:
4+
push:
5+
paths:
6+
- 'raw/**'
7+
- 'scripts/split_reference.py'
8+
- '.github/workflows/sync-www.yml'
9+
branches:
10+
- main
11+
12+
jobs:
13+
sync:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout docs
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.x'
23+
24+
- name: Split Reference
25+
run: python3 scripts/split_reference.py
26+
27+
- name: Checkout www
28+
uses: actions/checkout@v4
29+
with:
30+
repository: zenc-lang/www
31+
token: ${{ secrets.WWW_REPO_TOKEN }}
32+
path: www
33+
34+
- name: Sync content
35+
run: |
36+
mkdir -p www/docs.zenc-lang.org/content/tour/
37+
# Copy all generated files to the target directory
38+
cp -r reference/* www/docs.zenc-lang.org/content/tour/
39+
40+
- name: Commit and Push
41+
run: |
42+
cd www
43+
git config user.name "github-actions[bot]"
44+
git config user.email "github-actions[bot]@users.noreply.github.com"
45+
git add docs.zenc-lang.org/content/tour/
46+
if git diff --staged --quiet; then
47+
echo "No changes to commit"
48+
else
49+
git commit -m "docs: Sync language reference from zenc-lang/docs"
50+
git push
51+
fi

0 commit comments

Comments
 (0)