2024-02-13 04:34:34 -06:00
|
|
|
name: Website
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-02-13 04:44:57 -06:00
|
|
|
branches: [master]
|
2024-02-13 04:34:34 -06:00
|
|
|
workflow_dispatch: {}
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: website
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2024-02-13 04:52:24 -06:00
|
|
|
website:
|
2024-02-13 04:34:34 -06:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
ref: master
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
path: website
|
|
|
|
ref: website
|
2024-02-13 04:48:05 -06:00
|
|
|
- id: cache-node-modules
|
2024-02-13 04:54:41 -06:00
|
|
|
uses: actions/cache@v4
|
2024-02-13 04:34:34 -06:00
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
2024-02-13 04:39:39 -06:00
|
|
|
key: ${{ hashFiles('**/package-lock.json') }}
|
2024-02-13 04:48:05 -06:00
|
|
|
- if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
2024-02-13 04:34:34 -06:00
|
|
|
npm install --omit=dev
|
|
|
|
cd website
|
|
|
|
npm install
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
path: gh-pages
|
|
|
|
ref: gh-pages
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: 20.x
|
|
|
|
cache: 'npm'
|
|
|
|
- run: npm run dox:build
|
|
|
|
- run: |
|
|
|
|
git config --global user.email "git@cha0s.io"
|
|
|
|
git config --global user.name "cha0s"
|
|
|
|
npm run gh-pages || true
|