File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 4747 cache : ${{ steps.detect-package-manager.outputs.manager }}
4848 - run : |
4949 npm ci
50+ - run : |
5051 git log -1 --format=%h > hash.txt
51- - run : npm run build --if-present
52+ ls -al
53+ npm run build --if-present
54+
55+
56+
57+ - run : |
58+
59+ git config --global user.name "github-actions[bot]"
60+ git config --global user.email "[email protected] " 61+
62+ ls -al
63+ cd www
64+ git init
65+ git add .
66+ git commit -m "Generated files after build"
67+ git checkout -b dist
68+ echo https://github.com/${{ github.repository }}.git
69+ git remote add origin https://github.com/${{ github.repository }}.git
70+
71+
72+
73+ git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:dist -f # 使用 GITHUB_TOKEN 进行身份验证
74+ env:
75+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 自动获取 Git
76+
77+
5278
5379
5480
You can’t perform that action at this time.
0 commit comments