Skip to content

Commit 455845d

Browse files
renancaraujofelangelScarlett Eliza
authored
docs: add workflows for docs (#120)
* docs: add workflows for docs * forgot this * format * woopsie * format again * i gave this too much space * update the lock * Apply suggestions from code review Co-authored-by: Scarlett Eliza <[email protected]> --------- Co-authored-by: Felix Angelov <[email protected]> Co-authored-by: Scarlett Eliza <[email protected]>
1 parent 50b3058 commit 455845d

File tree

6 files changed

+7241
-3269
lines changed

6 files changed

+7241
-3269
lines changed

.github/workflows/site.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: docs
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/site.yaml"
7+
- "site/**"
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
defaults:
14+
run:
15+
working-directory: site
16+
17+
steps:
18+
- name: 📚 Git Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: ⚙️ Setup Node
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 16.x
25+
cache: npm
26+
cache-dependency-path: site/package-lock.json
27+
28+
- name: 📦 Install Dependencies
29+
run: npm ci
30+
31+
- name: ✨ Check Format
32+
run: npm run format:check
33+
34+
- name: 🧹 Lint
35+
run: npm run lint
36+
37+
- name: 👷 Build website
38+
run: npm run build

.github/workflows/site_deploy.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
paths:
6+
- ".github/workflows/site_deploy.yaml"
7+
- "site/**"
8+
branches:
9+
- main
10+
11+
deploy:
12+
name: Deploy to GitHub Pages
13+
14+
runs-on: ubuntu-latest
15+
16+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
17+
18+
defaults:
19+
run:
20+
working-directory: site
21+
22+
steps:
23+
- name: 📚 Git Checkout
24+
uses: actions/checkout@v3
25+
26+
- name: ⚙️ Setup Node
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 16.x
30+
cache: npm
31+
cache-dependency-path: site/package-lock.json
32+
33+
- name: 📦 Install Dependencies
34+
run: npm ci
35+
36+
- name: ✨ Check Format
37+
run: npm run format:check
38+
39+
- name: 🧹 Lint
40+
run: npm run lint
41+
42+
- name: 👷 Build website
43+
run: npm run build
44+
45+
- name: ☁️ Deploy to GitHub Pages
46+
uses: peaceiris/actions-gh-pages@v3
47+
with:
48+
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
49+
publish_dir: ./site/build
50+
user_name: github-actions[bot]
51+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

site/docusaurus.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ const config = {
1717

1818
// GitHub pages deployment config.
1919
// If you aren't using GitHub pages, you don't need these.
20-
organizationName: 'my-org', // Usually your GitHub org/user name.
21-
projectName: 'my_docs_site', // Usually your repo name.
20+
organizationName: 'VeryGoodOpenSource', // Usually your GitHub org/user name.
21+
projectName: 'very_good_workflows', // Usually your repo name.
2222

2323
// Even if you don't use internalization, you can use this field to set useful
2424
// metadata like html lang. For example, if your site is Chinese, you may want
@@ -37,7 +37,8 @@ const config = {
3737
sidebarPath: require.resolve('./sidebars.js'),
3838
// Please change this to your repo.
3939
// Remove this to remove the "edit this page" links.
40-
editUrl: 'https://github.com/my-org/my_docs_site/tree/main/',
40+
editUrl:
41+
'https://github.com/VeryGoodOpenSource/very_good_workflows/tree/main/site',
4142
},
4243
theme: {
4344
customCss: require.resolve('./src/css/custom.css'),

0 commit comments

Comments
 (0)