mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-27 07:05:27 +00:00
Updated Wiki content
22
.github/workflows/deploy-wiki.yml
vendored
22
.github/workflows/deploy-wiki.yml
vendored
@@ -8,7 +8,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout OrcaSlicer_WIKI repository
|
- name: Checkout OrcaSlicer_WIKI repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -39,27 +39,37 @@ jobs:
|
|||||||
|
|
||||||
- name: Clone orca-website repository
|
- name: Clone orca-website repository
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/OrcaSlicer/orca-website.git orca-website
|
for attempt in 1 2 3; do
|
||||||
|
echo "Clone attempt $attempt"
|
||||||
|
if git clone --depth 1 https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/OrcaSlicer/orca-website.git orca-website; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if [ "$attempt" -eq 3 ]; then
|
||||||
|
echo "Clone failed after $attempt attempts"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep $((attempt * 15))
|
||||||
|
done
|
||||||
|
|
||||||
- name: Deploy wiki content
|
- name: Deploy wiki content
|
||||||
run: |
|
run: |
|
||||||
# Remove old wiki folder if it exists
|
# Remove old wiki folder if it exists
|
||||||
rm -rf orca-website/wiki
|
rm -rf orca-website/wiki
|
||||||
|
|
||||||
# Copy new wiki content
|
# Copy new wiki content
|
||||||
cp -r wiki orca-website/wiki
|
cp -r wiki orca-website/wiki
|
||||||
|
|
||||||
# Configure git
|
# Configure git
|
||||||
cd orca-website
|
cd orca-website
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
# Check if there are changes to commit
|
# Check if there are changes to commit
|
||||||
if git diff --quiet && git diff --staged --quiet; then
|
if git diff --quiet && git diff --staged --quiet; then
|
||||||
echo "No changes to deploy"
|
echo "No changes to deploy"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Stage, commit and push
|
# Stage, commit and push
|
||||||
git add wiki
|
git add wiki
|
||||||
git commit -m "Update wiki content from OrcaSlicer_WIKI
|
git commit -m "Update wiki content from OrcaSlicer_WIKI
|
||||||
|
|||||||
Reference in New Issue
Block a user