-
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
1 parent
1d991aa
commit af72e6f
Showing
1 changed file
with
37 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,37 @@ | ||
# .github/workflows/build-and-deploy.yml | ||
|
||
name: Node.js CI | ||
permissions: | ||
contents: write | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# https://github.com/actions/checkout | ||
- name: Checkout source repository | ||
uses: actions/checkout@v3 | ||
# https://github.com/actions/setup-node | ||
- name: Setup Node.js installation | ||
uses: actions/setup-node@v3 | ||
with: | ||
# update the Node version to meet your needs | ||
node-version: 16 | ||
cache: npm | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Build Next App | ||
run: npm run build | ||
- name: Export Next App | ||
run: | | ||
npm run export | ||
touch out/.nojekyll | ||
- name: Deploy to Github Pages | ||
# https://github.com/JamesIves/github-pages-deploy-action | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: out |