Skip to content

fix: action

fix: action #2

Workflow file for this run

name: Sync to WWW Repository
on:
push:
paths:
- 'raw/**'
- 'scripts/split_reference.py'
- '.github/workflows/sync-www.yml'
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout docs
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Split Reference
run: python3 scripts/split_reference.py
- name: Checkout www
uses: actions/checkout@v4
with:
repository: zenc-lang/www
token: ${{ secrets.WEBSITE_REPO_TOKEN }}
path: www
fetch-depth: 0
- name: Sync content
run: |
mkdir -p www/docs.zenc-lang.org/content/tour/
# Copy all generated files to the target directory
cp -r reference/* www/docs.zenc-lang.org/content/tour/
- name: Commit and Push
run: |
cd www
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs.zenc-lang.org/content/tour/
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "docs: Sync language reference from zenc-lang/docs"
git push
fi