Skip to content

Commit

Permalink
Merge pull request #100 from DerekStride/ds/gh-pages
Browse files Browse the repository at this point in the history
Publish parser artifacts on GitHub pages build
  • Loading branch information
DerekStride authored Mar 9, 2023
2 parents 84a2b20 + 490c381 commit fcc9a44
Show file tree
Hide file tree
Showing 13 changed files with 169 additions and 374,554 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest, windows-2019]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
- run: npm install
- run: npm test
33 changes: 33 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy GitHub Pages
on:
push:
branches:
- main

jobs:
jekyll:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- name: Publish parser on GitHub Pages
run: cp -r src docs
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.0
- uses: limjh16/jekyll-action-ts@v2
env:
NODE_ENV: "production"
with:
enable_cache: true
- name: 🚀 deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
publish_branch: gh-pages
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ build
package-lock.json
/target/
/.build/
/src/
6 changes: 6 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
src/
10 changes: 10 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

source "https://rubygems.org"

gem "jekyll", "~> 4.3.2"

group :development do
gem 'webrick'
gem 'pry-byebug'
end
86 changes: 86 additions & 0 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
byebug (11.1.3)
coderay (1.1.3)
colorator (1.1.0)
concurrent-ruby (1.2.0)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
forwardable-extended (2.6.0)
google-protobuf (3.22.0-arm64-darwin)
google-protobuf (3.22.0-x86_64-linux)
http_parser.rb (0.8.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jekyll (4.3.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
method_source (1.0.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
public_suffix (5.0.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (4.1.0)
safe_yaml (1.0.5)
sass-embedded (1.58.2-arm64-darwin)
google-protobuf (~> 3.21)
sass-embedded (1.58.2-x86_64-linux-gnu)
google-protobuf (~> 3.21)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.4.2)
webrick (1.8.1)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-linux

DEPENDENCIES
jekyll (~> 4.3.2)
pry-byebug
webrick

BUNDLED WITH
2.4.6
Empty file added docs/_config.yml
Empty file.
13 changes: 13 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>tree-sitter-sql</title>
</head>
<body>
<main>
<article class="prose prose-sm sm:prose lg:prose-lg xl:prose-xl">
{{- content -}}
</article>
</main>
</body>
</html>
17 changes: 17 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: default
---

# tree-sitter-sql

The SQL grammar is defined at @ [github://derekstride/tree-sitter-sql](https://github.com/DerekStride/tree-sitter-sql).
You can view the latest parser artifacts on site or on the [gh-pages
branch](https://github.com/DerekStride/tree-sitter-sql/tree/gh-pages/src).

Find previous artifacts in the [history on GitHub](https://github.com/DerekStride/tree-sitter-sql/commits/gh-pages).

The artifacts can also be found here:

{% for file in site.static_files %}
[{{ file.path }}](/tree-sitter-sql{{ file.path }})
{% endfor %}
Loading

0 comments on commit fcc9a44

Please sign in to comment.