Skip to content

Commit 2e0173e

Browse files
authored
WIP: Implement Docssaurus (typescript-cheatsheets#214)
* introduce web docs with docusaurus * tweak footer * add migration * add HOC * clean readme * remove pointless buttons * rollback prettier action * enable changes on docs trigger deploy * package json cleanup * setup cache for prettier check * remove redundant title
1 parent bd3e2a6 commit 2e0173e

File tree

93 files changed

+12265
-3899
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+12265
-3899
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*/node_modules
2+
*.log

.github/workflows/deploy-website.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [master]
5+
paths:
6+
- "website/**"
7+
- "docs/**"
8+
pull_request:
9+
branches: [master]
10+
11+
jobs:
12+
deploy-docs:
13+
runs-on: ubuntu-latest
14+
# TODO: Change this before merge
15+
if: github.repository == 'raulfdm/react-typescript-cheatsheet'
16+
17+
env:
18+
working-directory: website
19+
node-version: 12.x
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Get yarn cache directory
25+
id: yarn
26+
run: echo "::set-output name=dir::$(yarn cache dir)"
27+
28+
- name: Restore yarn cache
29+
uses: actions/[email protected]
30+
with:
31+
path: ${{ steps.yarn.outputs.dir }}
32+
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/website/yarn.lock')) }}
33+
34+
- name: Install packages
35+
working-directory: ${{ env.working-directory }}
36+
run: yarn --frozen-lockfile
37+
38+
- name: Deploy to GitHub Pages
39+
working-directory: ${{ env.working-directory }}
40+
run: |
41+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
42+
git config --global user.name "${GITHUB_ACTOR}"
43+
echo "machine github.com login ${GITHUB_ACTOR} password ${{ secrets.GITHUB_TOKEN }}" > ~/.netrc
44+
GIT_USER=${GITHUB_ACTOR} yarn deploy

.github/workflows/main.yml

+20-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
name: CI
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [master]
55
pull_request:
6-
branches: [ master ]
6+
branches: [master]
77

88
jobs:
99
prettier:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v2
1313

14-
- name: Install dependencies
15-
run: yarn install --frozen-lockfile
14+
- name: Get yarn cache directory
15+
id: yarn
16+
run: echo "::set-output name=dir::$(yarn cache dir)"
1617

17-
- name: Format code
18-
run: yarn format
19-
20-
- name: Format correct?
21-
run: git diff --exit-code
18+
- name: Restore yarn cache
19+
uses: actions/[email protected]
20+
with:
21+
path: ${{ steps.yarn.outputs.dir }}
22+
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/website/yarn.lock')) }}
23+
24+
- name: Install dependencies
25+
run: yarn install --frozen-lockfile
26+
27+
- name: Format code
28+
run: yarn format
29+
30+
- name: Format correct?
31+
run: git diff --exit-code

.gitignore

+119-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,119 @@
1-
node_modules/
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
.parcel-cache
78+
79+
# Next.js build output
80+
.next
81+
82+
# Nuxt.js build / generate output
83+
.nuxt
84+
dist
85+
86+
# Gatsby files
87+
.cache/
88+
# Comment in the public line in if your project uses Gatsby and not Next.js
89+
# https://nextjs.org/blog/next-9-1#public-directory-support
90+
# public
91+
92+
# vuepress build output
93+
.vuepress/dist
94+
95+
# Serverless directories
96+
.serverless/
97+
98+
# FuseBox cache
99+
.fusebox/
100+
101+
# DynamoDB Local files
102+
.dynamodb/
103+
104+
# TernJS port file
105+
.tern-port
106+
107+
# Stores VSCode versions used for testing VSCode extensions
108+
.vscode-test
109+
110+
# yarn v2
111+
112+
.yarn/cache
113+
.yarn/unplugged
114+
.yarn/build-state.yml
115+
.pnp.*
116+
117+
# Miscellaneous
118+
.history
119+
website/build

0 commit comments

Comments
 (0)