-
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (45 loc) · 1.43 KB
/
build.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
39
40
41
42
43
44
45
46
47
name: Build and publish to GitHub Pages branch
on:
push:
branches:
# Build whenever the main branch is pushed.
- 'main'
paths-ignore:
# Exclude changes that only affect these directories and files.
- '.github/**'
- 'docs/**'
- 'README.md'
pull_request:
branches:
# Build whenever the main branch has a pull request.
- 'main'
paths-ignore:
# Exclude changes that only affect these directories and files.
- '.github/**'
- 'docs/**'
- 'README.md'
jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install dependencies
# The first line of `run` is designed to omit husky setup, since it's
# not necessary or desireable in a remote build.
run: |
npm set-script prepare ""
npm ci
- name: Build the production site
run: gulp --prod
- name: Publish to the GitHub Pages branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages # Branch name where you want to push the built site.
FOLDER: dist # Directory where the site is built.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically generated.
MESSAGE: 'Build: ({sha}) {msg}' # The commit message.