Skip to content

Commit

Permalink
[feat] CI/CD development.
Browse files Browse the repository at this point in the history
  • Loading branch information
yasgo committed Oct 17, 2024
1 parent 9cd5510 commit aafc3c7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
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

0 comments on commit aafc3c7

Please sign in to comment.