Added CN Front page #15
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
name: Push Static site to Static Repo | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Skip deploy | |
if: contains(github.event.head_commit.message, '[skip ci]') | |
run: exit 0 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: npm install | |
- name: Build with Next.js | |
run: npm run build | |
- name: Set git global config | |
run: git config --global user.email "[email protected]" && git config --global user.name "Joon Shakya (GitHub Actions)" | |
- name: Change into out directory and push to Static site | |
run: cd out && git init && git remote add static-html https://joonshakya:${{ secrets.PAT }}@github.com/joonshakya/CSIT21-Next-Static.git && git add . && git branch -M static && git commit -m "Deploy" && git push static-html static --force |