Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted updates #40

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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