forked from rootwork/GET
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (60 loc) · 2.13 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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: Report broken links
uses: urlstechie/urlchecker-action@master
with:
# A subfolder or path to navigate to in the present or cloned repository
subfolder: dist
# A comma-separated list of file types to cover in the URL checks
file_types: .md,.html
# The timeout seconds to provide to requests, defaults to 5 seconds
timeout: 30
# How many times to retry a failed request (each is logged, defaults to 1)
retry_count: 1
# Choose whether to include files with no URLs in the output
print_all: false
# A comma separated patterns to exclude during URL checks
exclude_patterns: http://www.w3.org
- name: Publish to the GitHub Pages branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: site # The branch name where you want to push the assets
FOLDER: dist # The directory where your assets are generated
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: 'Build: ({sha}) {msg}' # The commit message