Skip to content

sync: Updates from docusaurus-template #4

sync: Updates from docusaurus-template

sync: Updates from docusaurus-template #4

Workflow file for this run

name: Rewrite Custom Configs
on:
push:
branches:
- main
paths-ignore:
- "bin/**"
- "changelog/**"
- "docs/**"
- "i18n/**"
- "openAPI/**"
- "static/**"
jobs:
reset-custom-configs:
runs-on: ubuntu-latest
permissions:
contents: write # Ensure the token has write permissions
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install Dependencies
run: npm install
- name: Run styles config script
run: node writedocs/styles.config.js
- name: Run Home config script
run: node home.config.js
- name: Configure Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Commit changes
run: |
git add .
if git diff-index --quiet HEAD --; then
echo "No changes to commit. Exiting."
exit 0
fi
git commit -m "Updates based on changes in config.json"
- name: Pull and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git pull --rebase origin main
git push origin main