Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
travismiller committed Sep 5, 2023
0 parents commit 486b879
Show file tree
Hide file tree
Showing 16 changed files with 7,115 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
48 changes: 48 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: GitHub pages

on: # Run when...
push: # ... we see a `git push` to one of these branches.
branches:
- main

workflow_dispatch: # ... we trigger the workflow via "Actions".

permissions: # Set the needed permissions on the GITHUB_TOKEN.
contents: read
pages: write
id-token: write

concurrency: # Only allow one instance at a time (killing any previously-running instance if necessary).
group: pages
cancel-in-progress: true

jobs: # Named steps.
deploy: # Build + post the assets.
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: "Node: Install"
uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm

- name: Static Build
run: make build

- name: Set Up Pages
uses: actions/configure-pages@v3

- name: Upload Artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
/node_modules
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.12.1
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
SHELL = /bin/bash

.PHONY: default
default:

.PHONY: clean
clean:
rm -rf node_modules build

build: public/assets/style.css
rm -rf build
cp -a public build
cp build/index.html build/404.html

.PHONY: dev
dev:
make -j2 dev-all

.PHONY: dev-all
dev-all: dev-server dev-style

.PHONY: dev-server
dev-server:
node src/dev.js

.PHONY: dev-style
dev-style:
npx tailwindcss -i src/style.css -o public/assets/style.css --watch

public/assets/style.css: node_modules src/style.css
npx tailwindcss -i src/style.css -o public/assets/style.css

node_modules/.package-lock.json: package.json package-lock.json
npm clean-install
[ -f node_modules/.package-lock.json ] && touch node_modules/.package-lock.json

node_modules: node_modules/.package-lock.json
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# assets.tulsaschools.org

A static site for directing users to Tulsa Public Schools’ instance of
[Follett Destiny] from the former URL of Tulsa Public Schools’ instance
of [Snipe-IT] ([assets.tulsaschools.org]).

## Deployment

Deployment is handled by [GitHub Pages] (see [.github/workflows/pages.yml]).

```console
$ make build
npx tailwindcss -i src/style.css -o public/assets/style.css

Rebuilding...

Done in 91ms.
```

```console
$ tree build
build
├── 404.html
├── assets
│ ├── style.css
│ └── tps-logo-color.svg
├── favicon.ico
├── index.html
└── robots.txt

```

## Development

Development dependencies include `node` (see [.node-version]) and optionally `make`.

```console
$ make dev
make -j2 dev-all
node src/dev.js
npx tailwindcss -i src/style.css -o public/assets/style.css --watch
Serving "./public" at http://127.0.0.1:8181
Ready for changes

Rebuilding...

Done in 93ms.
```


[Follett Destiny]: https://tulsaschools.follettdestiny.com/
[Snipe-IT]: https://snipeitapp.com/
[assets.tulsaschools.org]: https://assets.tulsaschools.org/
[GitHub Pages]: https://pages.github.com/
[.node-version]: .node-version
[.github/workflows/pages.yml]: .github/workflows/pages.yml
Loading

0 comments on commit 486b879

Please sign in to comment.