move to just as task runner

better job names; see why just is failing


read the fine manual


propagate tea magic
This commit is contained in:
Jacob Heider 2023-01-18 16:13:20 -05:00 committed by Jacob Heider
parent df5f433216
commit bf21f8beeb
5 changed files with 55 additions and 33 deletions

View file

@ -1,3 +1,5 @@
name: cd
on:
push:
branches:
@ -9,9 +11,6 @@ concurrency:
group: deploy
cancel-in-progress: true
env:
TEA_SECRET: ${{ secrets.TEA_SECRET }}
jobs:
deploy:
runs-on: ubuntu-latest
@ -40,8 +39,8 @@ jobs:
cmd: '.github/build-package-pages.sh src/data/packages.json src/content'
- uses: teaxyz/setup@v0
with:
target: build
- run: tea -E just ci
# NOTE: temp disabled? maybe can be addressed by https://github.com/teaxyz/www/issues/252
# - name: Check for broken links
# uses: lycheeverse/lychee-action@v1

View file

@ -1,3 +1,5 @@
name: cleanup
on:
pull_request:
types:

View file

@ -1,3 +1,5 @@
name: staging
on: pull_request
concurrency:
@ -5,7 +7,6 @@ concurrency:
cancel-in-progress: true
env:
TEA_SECRET: ${{ secrets.TEA_SECRET }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
jobs:
@ -48,16 +49,15 @@ jobs:
cmd: '.github/build-package-pages.sh src/data/packages.json src/content'
- uses: teaxyz/setup@v0
with:
target: build
- run: tea -E just ci
- name: Check for broken links
uses: lycheeverse/lychee-action@v1
with:
fail: true
args: --verbose --no-progress './public/**/*.md' './public/**/*.html'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# - name: Check for broken links
# uses: lycheeverse/lychee-action@v1
# with:
# fail: true
# args: --verbose --no-progress './public/**/*.md' './public/**/*.html'
# env:
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# update packages json data and rebuild again
- name: make images relative path to preview site
@ -67,9 +67,7 @@ jobs:
# intentional to rebuild packages again with relative image data
# the first one to test it against prod resources via lychee
- uses: teaxyz/setup@v0
with:
target: build
- run: tea -E just ci
- uses: actions/setup-node@v3
with:

26
.justfile Normal file
View file

@ -0,0 +1,26 @@
# list available jobs
default:
just --list
# runs `hugo serve` locally
serve:
hugo serve --watch --buildDrafts --source src
# makes the package pages
package-pages:
.github/build-package-pages.sh src/data/packages.json src/content
# builds the site for ci
ci:
-test -d node_modules && rm -rf node_modules
npm ci
hugo --source src --destination ../public --minify
# builds the site
build:
npm i
hugo --source src --destination ../public --minify
# cleans up build artifacts
clean:
rm -rf public

View file

@ -21,6 +21,8 @@ hugo can render your edits while you work:
```sh
hugo serve --watch --buildDrafts --source src
# or
just serve
```
## Package Pages
@ -34,25 +36,18 @@ Which resembles the installation tag in tea cli
```sh
.github/build-package-pages.sh src/data/packages.json src/content
# or
just package-pages
```
## Dependencies
| Project | Version |
|------------|---------|
|--------------|---------|
| gohugo.io | >=0.99 |
| nodejs.org | >=14 |
| npmjs.com | * |
Install them yourself or use tea:
```
$ sh <(curl tea.xyz)
$ tea +git-scm.org git clone https://github.com/teaxyz/www tea-www
$ cd tea-www
$ tea .
```
| just.systems | ~1 |
# Build
@ -61,6 +56,8 @@ Builds a static, deployable version of the website.
```sh
npm ci
hugo --source src --destination ../public --minify
# or
just build
```