Skip to content

Commit 442de21

Browse files
committed
ci: add GitHub Actions workflow to push README markdown to Notion page
1 parent e221ead commit 442de21

2 files changed

Lines changed: 40 additions & 11 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Push README markdown code to a Notion page when changes are pushed
2+
# or when the workflow is manually triggered.
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- master
9+
jobs:
10+
push_markdown_job:
11+
runs-on: ubuntu-latest
12+
name: Push Markdown to Notion
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 2
18+
- name: Push Markdown to Notion
19+
uses: JoshStern/push-md-to-notion@v0.4.0
20+
id: push_markdown
21+
with:
22+
notion-token: ${{ secrets.NOTION_TOKEN }}

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
---
2+
notion_page: https://www.notion.so/Coding-Standards-3aafb6c5496580dfacedc234b633c8e4
3+
title: Coding Standards
4+
---
5+
16
# Coding Standards
2-
This is a little repo to document my coding standards and styles for easy reference.
37

8+
This is a little repo to document my coding standards and styles for easy reference.
49

510
## Indentation
11+
612
Tabs
713

814
1 Tab = 4 spaces
915

1016
## Curly brackets
17+
1118
Start curly brackets on if else blocks and functions should be on the same line as the declaration with a space before the curly bracket.
1219

1320
```js
@@ -19,6 +26,7 @@ function thing() {
1926
```
2027
2128
## else
29+
2230
`else if` and `else` blocks should be on a new line after the previous closing curly bracket
2331
2432
```js
@@ -30,8 +38,8 @@ else {
3038
}
3139
```
3240
33-
3441
# Git Commits
42+
3543
I use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) with the extra commit types as [described in Angular](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type) and also some from the [Medium article - Conventional Commits: A Better Way ](https://medium.com/neudesic-innovation/conventional-commits-a-better-way-78d6785c2e08).
3644
3745
## Commit types
@@ -67,32 +75,31 @@ I use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) wit
6775
## Abstraction
6876
6977
- Helps focus on the essential elements of an object, and hide less important details or mechanisms.
70-
- Organises code more efficiently and extracts (*abstracts*) parts of the code into their own functions, methods, etc., using the DOT prinicple.
71-
- Allows a program to not worry about the details of *how* an action is performed, but only *what* action is performed.
78+
- Organises code more efficiently and extracts (_abstracts_) parts of the code into their own functions, methods, etc., using the DOT prinicple.
79+
- Allows a program to not worry about the details of _how_ an action is performed, but only _what_ action is performed.
7280
- A form of separation of concerns.
7381
- Helps to construct more understandable code and promotes reusability.
7482
7583
## Inheritance
7684
7785
- Allows an object (child) to extend another object (parent).
78-
- The child *inherits* all the properties and methods from the parent.
86+
- The child _inherits_ all the properties and methods from the parent.
7987
- Allows usage of the code from the parent.
8088
- Enables the child to override methods and properties of the parent with it's own implementation.
8189
- Promotes reusability and avoids duplication, meaning DRYer code.
8290
8391
## Polymorphism
8492
8593
- Extends inheritance, by allowing the parent object to become an `abstract` template object.
86-
- Defines common methods for the child objects to *inherit* and use.
87-
- Defines specific `abstract` methods that the child objects *must* implement.
94+
- Defines common methods for the child objects to _inherit_ and use.
95+
- Defines specific `abstract` methods that the child objects _must_ implement.
8896
- Allows child objects of different types to perform the same method but with differing implementations.
8997
- Promotes reusability and flexibility.
9098
9199
## Single Responsibility
92100
93101
- Extends on the DOT principle.
94-
- A *single* file should define a *single* object.
95-
- An object should have only a *single* responsibility - Do One Thing.
96-
- An object should have a *single* reason to change.
102+
- A _single_ file should define a _single_ object.
103+
- An object should have only a _single_ responsibility - Do One Thing.
104+
- An object should have a _single_ reason to change.
97105
- Promotes organisation.
98-

0 commit comments

Comments
 (0)