File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Export and Deploy to Github Pages Repo
2+
3+ on :
4+ push :
5+ branches :
6+ - main # 'main' branch'a commit atıldığında workflow çalışacak
7+
8+ jobs :
9+ build-and-deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout the repository
14+ uses : actions/checkout@v3
15+
16+ - name : Install dependencies
17+ run : npm install
18+
19+ - name : Build Next.js project
20+ run : npm run build
21+
22+ - name : Export Next.js project to static files
23+ run : npm run export
24+
25+ - name : Push to githubvisitorstats.github.io repo
26+ run : |
27+ cd out
28+ git init
29+ git remote add origin https://github.com/githubvisitorstats/githubvisitorstats.github.io.git
30+ git add .
31+ git commit -m "Auto-export from githubvisitorstats-fe"
32+ git push -f https://githubvisitorstats:${{ secrets.DESTINATION_REPO_PAT }}@github.com/githubvisitorstats/githubvisitorstats.github.io.git main
You can’t perform that action at this time.
0 commit comments