Skip to content

Commit fa5311b

Browse files
authored
Project Rewrite (#56)
* rewrite * feat: Add Github Pages deployment config * feat: Update meta info * chore: remove unuses assets * fix: update react router config basename
1 parent 87c4b8b commit fa5311b

109 files changed

Lines changed: 9200 additions & 23273 deletions

File tree

Some content is hidden

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

.babelrc

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

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.react-router
2+
build
3+
node_modules
4+
README.md

.env.development

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

.env.production

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

.eslintrc.yaml

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

.github/workflows/ci-test.yml

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

.github/workflows/deploy.yml

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,65 @@
1-
name: Deploy to Github Pages
1+
name: Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
716

817
jobs:
9-
deployment:
18+
build:
1019
runs-on: ubuntu-latest
11-
1220
steps:
13-
- uses: actions/checkout@v4
21+
- name: Checkout
22+
uses: actions/checkout@v4
1423

15-
- name: Setup Node
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
27+
- name: Setup Node.js
1628
uses: actions/setup-node@v4
1729
with:
18-
node-version: "lts/*"
19-
cache: "yarn"
30+
node-version: 20
31+
cache: pnpm
2032

21-
- uses: actions/cache@v4
22-
with:
23-
path: |
24-
${{ github.workspace }}/.next/cache
25-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
33+
- name: Install dependencies
34+
run: pnpm install --frozen-lockfile
2635

2736
- name: Build
2837
env:
2938
PACKAGE_INDEX_URL: "https://github.com/espanso/hub/releases/download/v1.0.0/package_index.json"
3039
run: |
31-
yarn install --frozen-lockfile
32-
yarn build
33-
yarn export
40+
pnpm build
41+
if [ -d build/client/hub-frontend ]; then
42+
cp -a build/client/hub-frontend/. build/client/
43+
rm -rf build/client/hub-frontend
44+
fi
45+
# Create a .nojekyll file to prevent GitHub Pages from ignoring files that begin with an underscore
46+
touch build/client/.nojekyll
3447
35-
- name: Deploy
36-
uses: peaceiris/actions-gh-pages@v4
48+
- name: Setup Pages
49+
uses: actions/configure-pages@v4
50+
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@v3
3753
with:
38-
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
39-
publish_dir: ./out
40-
cname: hub.espanso.org
54+
path: build/client
55+
56+
deploy:
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 8 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,12 @@
1-
# Custom
2-
.packagesRepo/
3-
public/sitemap-0.xml
4-
.vscode
5-
out/
1+
.windsurf/local
62

7-
# Logs
8-
logs
9-
*.log
10-
npm-debug.log*
11-
yarn-debug.log*
12-
yarn-error.log*
13-
lerna-debug.log*
3+
# Old project
4+
old
145

15-
# Diagnostic reports (https://nodejs.org/api/report.html)
16-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
17-
18-
# Runtime data
19-
pids
20-
*.pid
21-
*.seed
22-
*.pid.lock
23-
24-
# Directory for instrumented libs generated by jscoverage/JSCover
25-
lib-cov
26-
27-
# Coverage directory used by tools like istanbul
28-
coverage
29-
*.lcov
30-
31-
# nyc test coverage
32-
.nyc_output
33-
34-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
35-
.grunt
36-
37-
# Bower dependency directory (https://bower.io/)
38-
bower_components
39-
40-
# node-waf configuration
41-
.lock-wscript
42-
43-
# Compiled binary addons (https://nodejs.org/api/addons.html)
44-
build/Release
45-
46-
# Dependency directories
47-
node_modules/
48-
jspm_packages/
49-
50-
# TypeScript v1 declaration files
51-
typings/
52-
53-
# TypeScript cache
54-
*.tsbuildinfo
55-
56-
# Optional npm cache directory
57-
.npm
58-
59-
# Optional eslint cache
60-
.eslintcache
61-
62-
# Microbundle cache
63-
.rpt2_cache/
64-
.rts2_cache_cjs/
65-
.rts2_cache_es/
66-
.rts2_cache_umd/
67-
68-
# Optional REPL history
69-
.node_repl_history
70-
71-
# Output of 'npm pack'
72-
*.tgz
73-
74-
# Yarn Integrity file
75-
.yarn-integrity
76-
77-
# dotenv environment variables file
78-
.env
79-
.env.test
80-
81-
# parcel-bundler cache (https://parceljs.org/)
82-
.cache
83-
84-
# Next.js build output
85-
.next
86-
87-
# Nuxt.js build / generate output
88-
.nuxt
89-
dist
90-
91-
# Gatsby files
92-
.cache/
93-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
94-
# https://nextjs.org/blog/next-9-1#public-directory-support
95-
# public
96-
97-
# vuepress build output
98-
.vuepress/dist
99-
100-
# Serverless directories
101-
.serverless/
102-
103-
# FuseBox cache
104-
.fusebox/
105-
106-
# DynamoDB Local files
107-
.dynamodb/
108-
109-
# TernJS port file
110-
.tern-port
111-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
112-
113-
# dependencies
114-
/node_modules
115-
/.pnp
116-
.pnp.js
117-
118-
# testing
119-
/coverage
120-
121-
# production
122-
/build
123-
124-
# yarn cruft
125-
## Disables zero install - https://yarnpkg.com/features/caching and https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
126-
.pnp.*
127-
.yarn/*
128-
!.yarn/patches
129-
!.yarn/plugins
130-
!.yarn/releases
131-
!.yarn/sdks
132-
!.yarn/versions
133-
134-
# misc
1356
.DS_Store
136-
.env.local
137-
.env.development.local
138-
.env.test.local
139-
.env.production.local
7+
.env
8+
/node_modules/
1409

141-
npm-debug.log*
142-
yarn-debug.log*
143-
yarn-error.log*
10+
# React Router
11+
/.react-router/
12+
/build/

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
build
3+
coverage

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)