-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Deploy GitHub Pages Example | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/configure-pages@v3 | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
- run: | | ||
# Fetch the data in workspace | ||
cd examples/workspace | ||
python3 -m pip install -r requirements.txt | ||
python3 fetch_data.py | ||
cd - | ||
# Build the index | ||
go run cmd/main.go examples/workspace/green_tripdata_2023-01.jsonl | ||
# Copy to client | ||
cp examples/workspace/green_tripdata_2023-01.jsonl examples/client | ||
cp examples/workspace/green_tripdata_2023-01.jsonl.index examples/client | ||
# Build the js lib | ||
npm ci | ||
npm run build | ||
# Copy the js lib | ||
cp dist/appendable.min.js examples/client | ||
cp dist/appendable.min.js.map examples/client | ||
- uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: examples/client | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
workspace | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Data taken from https://www.nyc.gov/site/tlc/about/tlc-trip-record-data.page | ||
|
||
import pandas as pd | ||
import requests | ||
import io | ||
|
||
response = requests.get('https://d37ci6vzurychx.cloudfront.net/trip-data/green_tripdata_2023-01.parquet') | ||
pd.read_parquet(io.BytesIO(response.content)).to_json('yellow_tripdata_2023-01.jsonl', orient='records', lines=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pyarrow | ||
pandas | ||
requests |