Skip to content

Commit 62e7cb0

Browse files
committed
Actions fix overwrite
1 parent 52c6c87 commit 62e7cb0

2 files changed

Lines changed: 9 additions & 36 deletions

File tree

‎.DS_Store‎

0 Bytes
Binary file not shown.

‎.github/workflows/deploy-bus.yml‎

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -34,40 +34,13 @@ jobs:
3434
cd bus
3535
npm run build
3636
37-
- name: Prepare deployment
38-
run: |
39-
# Copy build output to temporary directory
40-
mkdir -p /tmp/bus-deploy
41-
cp -r bus/build/* /tmp/bus-deploy/
42-
43-
# Create 404.html for SPA routing
44-
cp /tmp/bus-deploy/index.html /tmp/bus-deploy/404.html
45-
46-
# Clear current bus/ directory (keep source in bus-src for safety)
47-
rm -rf bus-deploy-temp
48-
mkdir -p bus-deploy-temp
49-
50-
# Move source to temporary location
51-
mv bus bus-src-temp
52-
53-
# Create new bus/ with build output
54-
mkdir -p bus
55-
cp -r /tmp/bus-deploy/* bus/
56-
57-
# Clean up
58-
rm -rf bus-src-temp
37+
- name: Add 404.html for SPA routing
38+
run: cp bus/build/index.html bus/build/404.html
5939

60-
- name: Commit and push if changed
61-
run: |
62-
git config user.name "github-actions[bot]"
63-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
64-
65-
git add bus/
66-
67-
if git diff --quiet --cached; then
68-
echo "No changes to deploy"
69-
exit 0
70-
fi
71-
72-
git commit -m "chore(bus): deploy build [skip ci]"
73-
git push
40+
- name: Deploy to gh-pages branch
41+
uses: peaceiris/actions-gh-pages@v3
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_dir: ./bus/build
45+
destination_dir: bus
46+
keep_files: true

0 commit comments

Comments
 (0)