Skip to content

Commit 896f82c

Browse files
authored
Merge pull request #247 from kwaka1208/astro
Astro化と大きい画面でのレイアウト調整
2 parents 5c01aae + 801e07d commit 896f82c

608 files changed

Lines changed: 12165 additions & 7799 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.

.dependabot/config.yml

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

.devcontainer/devcontainer.json

Lines changed: 18 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,43 @@
11
// Specifications: https://containers.dev/implementors/json_reference/
22
// Format details: https://aka.ms/devcontainer.json
3-
// Config options: https://github.com/microsoft/vscode-dev-containers/tree/main/containers/ruby
43
{
54
"name": "dojocon2023.coderdojo.jp",
65

7-
// Universal is well-customized image for Codespaces:
8-
// https://hub.docker.com/_/microsoft-devcontainers-universal
9-
//"image": "mcr.microsoft.com/devcontainers/universal:2",
10-
//"image": "mcr.microsoft.com/devcontainers/universal:2.2.9",
11-
12-
// Use Ruby image if you want to pin Ruby version like '3.2'
13-
// https://github.com/devcontainers/images/tree/main/src/ruby
14-
"image": "mcr.microsoft.com/devcontainers/ruby:3.2",
15-
16-
// Enable learners to choose an affordable spec, starting at minimum one.
17-
//"hostRequirements": {
18-
// "cpus": 2,
19-
// "memory": "4gb",
20-
// "storage": "32gb"
21-
//},
6+
// Astro 7 は Node.js 22.12 以上が必要
7+
// https://github.com/devcontainers/images/tree/main/src/javascript-node
8+
"image": "mcr.microsoft.com/devcontainers/javascript-node:22",
229

2310
"waitFor": "onCreateCommand",
24-
"onCreateCommand": "gem install solargraph",
25-
//"onCreateCommand": "",
26-
//# => Solargraph gem not found. Run `gem install solargraph` or update your Gemfile.
27-
"updateContentCommand": "bundle install",
28-
"postCreateCommand": "",
11+
"updateContentCommand": "npm ci",
2912
"postAttachCommand": {
30-
"server": "jekyll serve"
13+
"server": "npm run dev -- --host"
3114
},
15+
3216
"customizations": {
3317
"codespaces": {
34-
"openFiles": [
35-
"index.md"
36-
]
18+
"openFiles": ["src/pages/index.astro"]
3719
},
3820
"vscode": {
3921
"extensions": [
40-
"GitHub.codespaces",
41-
"rebornix.Ruby", // https://github.com/rubyide/vscode-ruby
42-
"castwide.solargraph" // https://github.com/castwide/vscode-solargraph
22+
"GitHub.codespaces",
23+
"astro-build.astro-vscode", // https://github.com/withastro/language-tools
24+
"esbenp.prettier-vscode"
4325
],
4426
"settings": {
45-
// Use Ctrl+Shift+P->Format to format.
46-
//"ruby.useLanguageServer": true ,
47-
//"ruby.format": "rubocop",
48-
//"ruby.lint": { "rubocop": true },
49-
//"ruby.intellisense": "rubyLocate",
50-
"editor.tabSize": 2,
51-
"editor.renderWhitespace": false,
52-
"files.associations": { "*.erb": "erb" },
53-
"emmet.includeLanguages": { "erb": "html" },
54-
55-
// Settings for Solargraph
56-
"solargraph.useBundler": false,
57-
"solargraph.diagnostics": false,
58-
"solargraph.formatting": true,
59-
"solargraph.autoformat": false,
60-
"solargraph.definitions": true,
61-
"solargraph.completion": true,
62-
"solargraph.references": true,
63-
"solargraph.symbols": true,
64-
"solargraph.rename": true,
65-
"solargraph.hover": true
27+
"editor.tabSize": 2,
28+
"editor.renderWhitespace": false,
29+
"[astro]": {
30+
"editor.defaultFormatter": "astro-build.astro-vscode"
31+
}
6632
}
6733
}
6834
},
35+
6936
"portsAttributes": {
70-
"4000": {
37+
"4321": {
7138
"label": "Application",
7239
"onAutoForward": "openPreview"
7340
}
7441
},
75-
"forwardPorts": [4000]
42+
"forwardPorts": [4321]
7643
}

.gitattributes

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

.github/workflows/deploy.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Test & Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# 同時デプロイを避ける(進行中のデプロイはキャンセルしない)
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: false
20+
21+
jobs:
22+
# 型チェックとリンク切れ検査。すべての push / PR で実行する
23+
test:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: ☑️ Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: 🟢 Setup Node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 22
33+
cache: npm
34+
35+
- name: 📦 Install dependencies
36+
run: npm ci
37+
38+
- name: 🧪 Type check
39+
run: npm run check
40+
41+
- name: 🔧 Build
42+
run: npm run build
43+
44+
- name: 🔗 Check internal links
45+
run: npm run test:links
46+
47+
# ビルドと GitHub Pages 用アーティファクトのアップロード
48+
build:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: ☑️ Checkout code
52+
uses: actions/checkout@v4
53+
54+
- name: 🔧 Build with Astro
55+
uses: withastro/action@v6
56+
with:
57+
node-version: 22
58+
59+
# main ブランチへの push かつ CI 通過時のみデプロイする
60+
deploy:
61+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
62+
needs: [test, build]
63+
runs-on: ubuntu-latest
64+
environment:
65+
name: github-pages
66+
url: ${{ steps.deployment.outputs.page_url }}
67+
steps:
68+
- name: 🚀 Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v4

.github/workflows/test.yml

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

.gitignore

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
_site
2-
.sass-cache
3-
.jekyll-cache
4-
.jekyll-metadata
5-
vendor
1+
# build output
2+
dist/
63

7-
.DS_Store
4+
# generated types
5+
.astro/
6+
7+
# dependencies
8+
node_modules/
9+
10+
# environment variables
11+
.env
12+
.env.production
13+
14+
# macOS
15+
.DS_Store

.ruby-version

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

404.html

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

Dockerfile

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

Gemfile

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

0 commit comments

Comments
 (0)