File tree Expand file tree Collapse file tree 1 file changed +9
-27
lines changed Expand file tree Collapse file tree 1 file changed +9
-27
lines changed Original file line number Diff line number Diff line change @@ -59,37 +59,19 @@ jobs:
5959 timeout-minutes : 10
6060 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
6161 steps :
62- - uses : actions/checkout@v4
63- with :
64- token : ${{ secrets.GITHUB_TOKEN }}
65-
6662 - name : Download generated project
6763 uses : actions/download-artifact@v4
6864 with :
6965 name : generated-project
70- path : deployment-content/
71-
72- - name : Configure Git
73- run : |
74- git config --global user.name "GitHub Actions"
75- git config --global user.email "[email protected] " 66+ path : generated/
7667
77- - name : Deploy to deployment branch
68+ - name : Push to production branch
7869 run : |
79- # Create deployment branch (or reset if exists)
80- git checkout --orphan deployment || git checkout deployment
81-
82- # Remove all existing content
83- git rm -rf . || true
84-
85- # Copy generated project content to root
86- cp -r deployment-content/* .
87-
88- # Add all files
70+ cd generated
71+ git init
72+ git config user.name "GitHub Actions"
73+ git config user.email "[email protected] " 8974 git add .
90-
91- # Create commit
92- git commit -m "Deploy generated project from commit ${{ github.sha }}"
93-
94- # Force push to deployment branch
95- git push origin deployment --force
75+ git commit -m "Generated project from main commit ${{ github.sha }}"
76+ git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
77+ git push -f origin HEAD:production
You can’t perform that action at this time.
0 commit comments