This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
115 lines (105 loc) · 3.06 KB
/
master.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Master
on:
push:
branches:
- master
jobs:
install:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Install
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
steps:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v2
- name: cache node_modules
uses: actions/cache@v2
id: cache
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Test
run: npm run test
semantic-version:
name: Semantic Release
needs: install
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
steps:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v2
- name: Versioning
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec -p semantic-release-ado semantic-release --provider=github
build-gh-pages:
name: Build (GH-Pages)
needs: install
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
steps:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v2
- name: cache node_modules
uses: actions/cache@v2
id: cache
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
- name: Build
run: |
npm run generate
mkdir dist/reports dist/reports/webpack
cp -R reports/webpack/* dist/reports/webpack
touch dist/.nojekyll
env:
WEBSITE_HOST: 'https://grabarzundpartner.github.io/nuxt-page-generator-helper'
BASE_PATH: /nuxt-page-generator-helper/
DIST_PATH: dist
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: ghpages
path: dist
deploy-ghpages:
name: Deploy (GH-Pages)
needs: build-gh-pages
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
steps:
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: ghpages
path: ghpages
- name: Deploy to GH-Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ghpages