Skip to content

Commit

Permalink
Merge pull request #40 from geojson/updates
Browse files Browse the repository at this point in the history
Assorted updates
  • Loading branch information
tschaub authored Mar 17, 2024
2 parents ed4bc7b + ea14bb9 commit eac5f0a
Show file tree
Hide file tree
Showing 22 changed files with 2,401 additions and 1,749 deletions.
46 changes: 36 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,47 @@
name: Deploy
name: Deploy to GitHub Pages

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Clone Repository
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
- run: make test
- uses: peaceiris/actions-gh-pages@v3
node-version: '20'

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Build Schema
run: make test

- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
path: ./build

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@v4
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Clone Repository
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
- run: make test
node-version: '20'

- name: Run Tests
run: make test
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ test: $(BUILD_SCHEMA) lint
lint: $(ALL_JS) node_modules/.install
@eslint $(ALL_JS);

.PHONY: lint-fix
lint-fix: $(ALL_JS) node_modules/.install
@eslint --fix $(ALL_JS);

.PHONY: clean
clean:
@rm -rf $(BUILD_DIR)
6 changes: 3 additions & 3 deletions bin/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ async function main() {
return Object.assign(
{
$schema: 'http://json-schema.org/draft-07/schema#',
$id: `${baseURL}${path.basename(input)}on`
$id: `${baseURL}${path.basename(input)}on`,
},
schema
);
}

main()
.then(schema => {
.then((schema) => {
process.stdout.write(JSON.stringify(schema, null, 2) + '\n');
})
.catch(err => {
.catch((err) => {
process.stderr.write(err.message + '\n', () => process.exit(1));
});
Loading

0 comments on commit eac5f0a

Please sign in to comment.