mirror of
https://github.com/ivabus/www
synced 2024-11-21 21:45:06 +03:00
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:
parent
df5f433216
commit
bf21f8beeb
5 changed files with 55 additions and 33 deletions
9
.github/workflows/cd.yml
vendored
9
.github/workflows/cd.yml
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
name: cd
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
@ -9,9 +11,6 @@ concurrency:
|
||||||
group: deploy
|
group: deploy
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
|
||||||
TEA_SECRET: ${{ secrets.TEA_SECRET }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -40,8 +39,8 @@ jobs:
|
||||||
cmd: '.github/build-package-pages.sh src/data/packages.json src/content'
|
cmd: '.github/build-package-pages.sh src/data/packages.json src/content'
|
||||||
|
|
||||||
- uses: teaxyz/setup@v0
|
- uses: teaxyz/setup@v0
|
||||||
with:
|
- run: tea -E just ci
|
||||||
target: build
|
|
||||||
# NOTE: temp disabled? maybe can be addressed by https://github.com/teaxyz/www/issues/252
|
# NOTE: temp disabled? maybe can be addressed by https://github.com/teaxyz/www/issues/252
|
||||||
# - name: Check for broken links
|
# - name: Check for broken links
|
||||||
# uses: lycheeverse/lychee-action@v1
|
# uses: lycheeverse/lychee-action@v1
|
||||||
|
|
2
.github/workflows/cleanup.yml
vendored
2
.github/workflows/cleanup.yml
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
name: cleanup
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
|
|
24
.github/workflows/staging.yml
vendored
24
.github/workflows/staging.yml
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
name: staging
|
||||||
|
|
||||||
on: pull_request
|
on: pull_request
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
@ -5,7 +7,6 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TEA_SECRET: ${{ secrets.TEA_SECRET }}
|
|
||||||
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
|
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -48,16 +49,15 @@ jobs:
|
||||||
cmd: '.github/build-package-pages.sh src/data/packages.json src/content'
|
cmd: '.github/build-package-pages.sh src/data/packages.json src/content'
|
||||||
|
|
||||||
- uses: teaxyz/setup@v0
|
- uses: teaxyz/setup@v0
|
||||||
with:
|
- run: tea -E just ci
|
||||||
target: build
|
|
||||||
|
|
||||||
- name: Check for broken links
|
# - name: Check for broken links
|
||||||
uses: lycheeverse/lychee-action@v1
|
# uses: lycheeverse/lychee-action@v1
|
||||||
with:
|
# with:
|
||||||
fail: true
|
# fail: true
|
||||||
args: --verbose --no-progress './public/**/*.md' './public/**/*.html'
|
# args: --verbose --no-progress './public/**/*.md' './public/**/*.html'
|
||||||
env:
|
# env:
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
|
||||||
# update packages json data and rebuild again
|
# update packages json data and rebuild again
|
||||||
- name: make images relative path to preview site
|
- name: make images relative path to preview site
|
||||||
|
@ -67,9 +67,7 @@ jobs:
|
||||||
|
|
||||||
# intentional to rebuild packages again with relative image data
|
# intentional to rebuild packages again with relative image data
|
||||||
# the first one to test it against prod resources via lychee
|
# the first one to test it against prod resources via lychee
|
||||||
- uses: teaxyz/setup@v0
|
- run: tea -E just ci
|
||||||
with:
|
|
||||||
target: build
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
|
|
26
.justfile
Normal file
26
.justfile
Normal 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
|
27
README.md
27
README.md
|
@ -21,6 +21,8 @@ hugo can render your edits while you work:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
hugo serve --watch --buildDrafts --source src
|
hugo serve --watch --buildDrafts --source src
|
||||||
|
# or
|
||||||
|
just serve
|
||||||
```
|
```
|
||||||
|
|
||||||
## Package Pages
|
## Package Pages
|
||||||
|
@ -34,25 +36,18 @@ Which resembles the installation tag in tea cli
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
.github/build-package-pages.sh src/data/packages.json src/content
|
.github/build-package-pages.sh src/data/packages.json src/content
|
||||||
|
# or
|
||||||
|
just package-pages
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
| Project | Version |
|
| Project | Version |
|
||||||
|------------|---------|
|
|--------------|---------|
|
||||||
| gohugo.io | >=0.99 |
|
| gohugo.io | >=0.99 |
|
||||||
| nodejs.org | >=14 |
|
| nodejs.org | >=14 |
|
||||||
| npmjs.com | * |
|
| npmjs.com | * |
|
||||||
|
| just.systems | ~1 |
|
||||||
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 .
|
|
||||||
```
|
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
|
|
||||||
|
@ -61,6 +56,8 @@ Builds a static, deployable version of the website.
|
||||||
```sh
|
```sh
|
||||||
npm ci
|
npm ci
|
||||||
hugo --source src --destination ../public --minify
|
hugo --source src --destination ../public --minify
|
||||||
|
# or
|
||||||
|
just build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue