Skip to content

Commit bd0cb3e

Browse files
committed
setup gh workflows
1 parent 47cf27f commit bd0cb3e

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

.github/workflows/cd.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# This workflow builds and deploys the site whenever the main branch changes, to ensure that it
3+
# doesn't have to be done manually. It can also be triggered manually, if desired.
4+
#
5+
6+
name: Continuous Deployment
7+
8+
on:
9+
workflow_dispatch:
10+
11+
push:
12+
branches:
13+
- main
14+
15+
jobs:
16+
CD:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Use Node.js
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: 12.x
26+
27+
# Install using the frozen lockfile, to maximize speed.
28+
- name: Install dependancies
29+
run: yarn install --frozen-lockfile
30+
31+
# Build the Docusaurus source to static files.
32+
- name: Build
33+
run: yarn build
34+
35+
# Deploy the resulting static files to the 'gh-pages' branch.
36+
- name: Deploy to GitHub Pages
37+
uses: JamesIves/github-pages-deploy-action@4.1.1
38+
with:
39+
branch: gh-pages
40+
folder: ./build

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# This workflow builds the site on pull requests to the main branch, to ensure that, prior to deployment,
3+
# the site can be successfully built without errors. This also verifies linting and style guides.
4+
#
5+
6+
name: Continuous Integration
7+
8+
on:
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
CI:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Use Node.js
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: 12.x
25+
26+
# Install using the frozen lockfile, to maximize speed.
27+
- name: Install dependancies
28+
run: yarn install --frozen-lockfile
29+
30+
# Verify the style guides.
31+
- name: Lint codebase
32+
run: yarn lint
33+
34+
# Build the Docusaurus source to static files.
35+
# If this command succeeds, a valid build can be produced.
36+
- name: Build
37+
run: yarn build

0 commit comments

Comments
 (0)