-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
23 lines (23 loc) · 1.04 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
language: node_js # Node.js based project
node_js:
- 14 # Level of Node.js to use
env:
- NEXT_TELEMETRY_DISABLED=1 # disable Next JS telemetry
cache:
directories:
- node_modules # Cache the node_modules folder for quicker build times
script:
- npm run build # Runs next build
- npm run export # Runs next export and generates the out directory
- touch out/.nojekyll # Creates a file telling Github not to build the project using Jekyll
deploy:
provider: pages # Informs Travis this is a deployment to GitHub Pages
skip_cleanup: true # Prevents Travis from resetting the working directory made during the build
github_token: $github_token # GitHub access token to use when pushing to the gh-pages branch
local_dir: out # Directory to push to the gh-pages branch
fqdn: $fqdn # CNAME record to point custom domain
on:
# Only deploy when the build is on master or main branch - two common default branch names
# If you're using a different branch name, add it here
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(master|main)$