Skip to content

Commit e315b8f

Browse files
authored
migrate to directus (#19)
* bump [email protected] * migrate to gatsby@4 * add directus plugin * reconfigure gatsby config * migrate to typescript * use config * provide directus config * fix config * src -> src-airtable * template speaker with pre * git hooks * prettier write * render speaker * speaker with meetup info * render talk * fetch all data * render speakers photo * update typescript * tsc pre-commit * render speaker photo in talks * render index page * render header * aggregate totalCount * render footer * render page template * render speakers list * render events * render contacts * render cfp * render qna * render event * print config * print by env * rewrite imports * fix talk query * enable seo * add login container * render partners * fix render event * minor date fixes * directus static token * fix main images * render event meta * drop airtable src * set directus as default data source * extend talk with paper * rebuild types * one datasource * write with prettier * pull request gh action * add build step * deploy gatsby * revert main branch * add deploy permissions * select company from talks * setup node v4 * publish using enriikke action * npx with husky * fix telegram link * obfuscate directus url * on PR build with limit of 10 results * self-hosted cfp * handle checkbox state * an empty commit * always build static pages * page cfp without Suspense * send cfp form * fix accept field * add bff uri * fix paths and types * an empty commit * an empty commit * try publish with directus * sort by talk time * publish from main
1 parent a53f0d2 commit e315b8f

File tree

117 files changed

+18718
-37286
lines changed

Some content is hidden

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

117 files changed

+18718
-37286
lines changed

.editorconfig

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
2-
3-
# top-most EditorConfig file
41
root = true
52

6-
# Unix-style newlines with a newline ending every file
73
[*]
8-
end_of_line = lf
94
charset = utf-8
10-
insert_final_newline = true
115
indent_style = space
126
indent_size = 2
7+
end_of_line = lf
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
quote_type = single

.env.development

Lines changed: 0 additions & 4 deletions
This file was deleted.

.env.development.local.example

Lines changed: 0 additions & 1 deletion
This file was deleted.

.env.example

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
NODE_TLS_REJECT_UNAUTHORIZED=0
2+
3+
GITHUB_ACTIONS_PR=0
4+
5+
# Gatsby
6+
GATSBY_SRC_ROOT=src
7+
GATSBY_PRINT_CONFIG=false
8+
SITE_URL=http://localhost:8000/
9+
10+
# Directus
11+
DIRECTUS_URL=http://localhost:8055
12+
DIRECTUS_TOKEN=<MY_PERSONAL_ACCESS_TOKEN_FROM_DIRECTUS>
13+
14+
# BFF API
15+
GATSBY_BFF_API_URL=http://bff.moscowjs.org

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "" # See documentation for possible values
4-
directory: "/" # Location of package manifests
3+
- package-ecosystem: '' # See documentation for possible values
4+
directory: '/' # Location of package manifests
55
schedule:
6-
interval: "daily"
6+
interval: 'daily'

.github/workflows/on-pr.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Pull request check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
checks:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
- name: Setup node
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
- name: Install dependencies
19+
run: npm ci
20+
- name: Prettier
21+
run: npm run lint:prettier
22+
- name: Typescript
23+
run: npm run lint:tsc
24+
- name: Gatsby Build
25+
run: npm run build
26+
env:
27+
NODE_ENV: production
28+
GITHUB_ACTIONS_PR: 1
29+
GATSBY_SRC_ROOT: src
30+
GATSBY_PRINT_CONFIG: true
31+
GATSBY_BFF_API_URL: https://bff.moscowjs.org
32+
SITE_URL: ${{ secrets.SITE_URL }}
33+
DIRECTUS_URL: ${{ secrets.DIRECTUS_URL }}
34+
DIRECTUS_TOKEN: ${{ secrets.DIRECTUS_TOKEN }}

.github/workflows/publish.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: Publish
22

33
on:
44
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
5+
branches:
6+
- main
87

98
# Allows you to run this workflow manually from the Actions tab
109
workflow_dispatch:
@@ -16,22 +15,24 @@ jobs:
1615

1716
# Steps represent a sequence of tasks that will be executed as part of the job
1817
steps:
19-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20-
- uses: actions/checkout@v4
21-
- uses: actions/setup-node@v4
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Setup node
21+
uses: actions/setup-node@v4
2222
with:
23-
node-version: '15'
23+
node-version: 20
2424
- name: Gatsby Publish
2525
uses: enriikke/gatsby-gh-pages-action@v2
2626
with:
2727
access-token: x-access-token:${{ secrets.ACCESS_TOKEN }}
2828
deploy-branch: gh-pages
2929
gatsby-args: --prefix-paths
30-
3130
env:
3231
NODE_ENV: production
33-
AIRTABLE_API_KEY: ${{ secrets.AIRTABLE_API_KEY }}
34-
AIRTABLE_BASE_ID: ${{ secrets.AIRTABLE_BASE_ID }}
35-
AIRTABLE_META_BASE_ID: ${{ secrets.AIRTABLE_META_BASE_ID }}
32+
GITHUB_ACTIONS_PR: 0
33+
GATSBY_SRC_ROOT: src
34+
GATSBY_PRINT_CONFIG: true
35+
GATSBY_BFF_API_URL: https://bff.moscowjs.org
3636
SITE_URL: ${{ secrets.SITE_URL }}
37-
PATH_PREFIX: ${{ secrets.PATH_PREFIX }}
37+
DIRECTUS_URL: ${{ secrets.DIRECTUS_URL }}
38+
DIRECTUS_TOKEN: ${{ secrets.DIRECTUS_TOKEN }}

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ typings/
5353

5454
# dotenv environment variable files
5555
.env*
56-
!.env.development
57-
!.env.development.local.example
56+
!.env.example
5857

5958
# gatsby files
6059
.cache/
@@ -72,4 +71,6 @@ yarn-error.log
7271
.yarn-integrity
7372

7473

75-
.history
74+
.history
75+
.vscode
76+
tsconfig.tsbuildinfo

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npx tsc --noEmit
2+
npx --no-install lint-staged

.lintstagedrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{js,ts,json,md,y*ml}": ["prettier --write"]
3+
}

0 commit comments

Comments
 (0)