forked from pubkey/rxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (59 loc) · 1.97 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
63
64
65
66
67
68
69
70
71
72
73
# This is a basic workflow to help you get started with Actions
name: build and push
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# This workflow contains a single job called "build"
build-all:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3.6.0
with:
node-version-file: '.nvmrc'
- name: install npm dependencies
run: npm install
- name: build code
run: npm run build
# TODO move from gitbook to honkit
# https://github.com/honkit/honkit
# so we do not need this
- name: downgrade nodejs for gitbook
uses: actions/setup-node@v3.6.0
with:
node-version: 13.8.0
- name: reinstall with older node version
run: |
node -v
rm -r node_modules/
npm install
- name: build docs
run: |
npm run docs:build
- name: Update node for landingpage
uses: actions/setup-node@v3.6.0
with:
node-version-file: '.nvmrc'
- name: build landingpage
run: |
node -v
rm -r node_modules/
npm install
npm run docs:landingpage:build
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "BUILD" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}