Skip to content

Gitloc auto translation #14

Gitloc auto translation

Gitloc auto translation #14

Workflow file for this run

name: Transform MDX Files
on:
pull_request:
push:
branches:
- main
- develop
workflow_dispatch: # Allow manual runs
jobs:
transform-mdx:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# Step 2: Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
# Step 3. Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.15.8
- name: Install dependencies
run: pnpm install
# Step 4: Run the transformation script
- name: Transform MDX to MD and Components
run: node ./src/scripts/transform-mdx.js
# Step 5 (Optional): Commit changes
- name: Commit changes
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add __translations__/ content/
git commit -m "Run MDX transformation script" || echo "No changes to commit"
git push