Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate all docs and blog from notion #8

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 30 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
name: Deploy to GitHub Pages
name: Auto Deploy to GitHub Pages

on:
push:
branches:
- main
schedule:
- cron: "20 * * * *"

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
with:
version: 7.8.0
version: 8.6.7

- name: Install dependencies
run: just install --frozen-lockfile
run: just _install --frozen-lockfile

- name: Build website
run: just build
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_DOCUMENT_ROOT: ${{ secrets.NOTION_DOCUMENT_ROOT }}
NOTION_BLOG_ROOT: ${{ secrets.NOTION_BLOG_ROOT }}

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
Expand All @@ -40,3 +50,15 @@ jobs:
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com

- name: Report Status
if: always()
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ job.status }}
notify_when: 'failure'
notification_title: '{workflow} has {status_message}'
footer: 'Linked to Repo <{repo_url}|{repo}>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}

18 changes: 13 additions & 5 deletions .github/workflows/test-deploy.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test deployment
name: Test build

on:
push:
Expand All @@ -9,21 +9,29 @@ on:

jobs:
test-deploy:
name: Test deployment
name: Test build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
with:
version: 7.8.0
version: 8.6.7

- name: Install dependencies
run: just install --frozen-lockfile
run: just _install --frozen-lockfile

- name: Test build website
run: just build
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_DOCUMENT_ROOT: ${{ secrets.NOTION_DOCUMENT_ROOT }}
NOTION_BLOG_ROOT: ${{ secrets.NOTION_BLOG_ROOT }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
.docusaurus
.cache-loader

# These are now generated from notion
/docs
/blog

# Misc
.DS_Store
.env
Expand All @@ -19,3 +23,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.tar.gz
20 changes: 0 additions & 20 deletions blog/2021-08-01-mdx-blog-post.mdx

This file was deleted.

Binary file not shown.
Binary file removed blog/2022-11-25-14-22-50.png
Binary file not shown.
71 changes: 0 additions & 71 deletions blog/2022-12-05-greatest-information-technology.mdx

This file was deleted.

58 changes: 0 additions & 58 deletions blog/2022-12-05-metapages-history.mdx

This file was deleted.

38 changes: 0 additions & 38 deletions blog/2022-12-05-metapages-is-deep-time.mdx

This file was deleted.

Binary file removed blog/Examples/1528015832.png
Binary file not shown.
Binary file removed blog/Examples/1607379524.gif
Binary file not shown.
Binary file removed blog/Examples/705447076.gif
Binary file not shown.
Binary file removed blog/Examples/Fruits/1911112500.png
Binary file not shown.
Binary file removed blog/Examples/Fruits/2091252224.png
Binary file not shown.
1 change: 0 additions & 1 deletion blog/Examples/Fruits/_category_.json

This file was deleted.

1 change: 0 additions & 1 deletion blog/Examples/_category_.json

This file was deleted.

24 changes: 0 additions & 24 deletions blog/authors.yml

This file was deleted.

31 changes: 0 additions & 31 deletions blog/intro-test.md

This file was deleted.

Loading