Edit text #68
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- dev # Trigger on push to the dev branch | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '20' # Specify your Node.js version | |
- name: Install dependencies | |
run: npm install | |
- name: Build Next.js site | |
run: npm run build | |
- name: Copy CNAME | |
run: cp CNAME ./out/ # Assuming CNAME is at the root of your project | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./out | |
publish_branch: master # Target branch to publish the site |