-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1003 Bytes
/
build-and-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# .github/workflows/build-and-deploy.yml
name: Node.js CI
permissions:
contents: write
on:
push:
branches: [main]
# TODO: reduce workflow duplication
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