-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Export and Deploy to Github Pages Repo | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # 'main' branch'a commit atıldığında workflow çalışacak | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build Next.js project | ||
run: npm run build | ||
|
||
- name: Export Next.js project to static files | ||
run: npm run export | ||
|
||
- name: Push to githubvisitorstats.github.io repo | ||
run: | | ||
cd out | ||
git init | ||
git remote add origin https://github.com/githubvisitorstats/githubvisitorstats.github.io.git | ||
git add . | ||
git commit -m "Auto-export from githubvisitorstats-fe" | ||
git push -f https://githubvisitorstats:${{ secrets.DESTINATION_REPO_PAT }}@github.com/githubvisitorstats/githubvisitorstats.github.io.git main |