-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
24 lines (24 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
24
language: node_js # Node.js based project
node_js:
- 12 # Level of Node.js to use
root: website
cache:
directories:
- website/node_modules # Cache the node_modules folder for quicker build times
script:
- cd website # go to the website folder
- npm install
- 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
local_dir: website/out
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)$