diff --git a/.github/workflows/dox.yml b/.github/workflows/dox.yml new file mode 100644 index 0000000..086cba7 --- /dev/null +++ b/.github/workflows/dox.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: [website] + workflow_dispatch: {} + +concurrency: + group: website-${{ github.ref }} + cancel-in-progress: true + +jobs: + + gh-pages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + repository: cha0s/flecks + token: ${{ secrets.GH_PAT }} + - run: npx dox:gh-pages diff --git a/package.json b/package.json index a4d353b..ab9ffc8 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,8 @@ }, "scripts": { "build": "node build/tasks npm run -- build", - "dox:bump": "npm run dox:gh-pages && cd dox && git add . && git commit -m $(git -C .. rev-parse HEAD) && git push origin gh-pages", - "dox:gh-pages": "flecks dox docusaurus && cd website && DOCUSAURUS_GENERATED_FILES_DIR_NAME=node_modules/.cache/docusaurus node_modules/.bin/docusaurus build --out-dir ../dox-tmp && cd .. && rm -rf dox/* && mv dox-tmp/* dox && rmdir dox-tmp", - "dox:serve": "flecks dox docusaurus && cd website && DOCUSAURUS_GENERATED_FILES_DIR_NAME=node_modules/.cache/docusaurus node_modules/.bin/docusaurus build --no-minify --out-dir ../dox-tmp && node_modules/.bin/docusaurus serve --dir ../dox-tmp", - "dox": "flecks dox docusaurus && cd website && DOCUSAURUS_GENERATED_FILES_DIR_NAME=node_modules/.cache/docusaurus node_modules/.bin/docusaurus", + "dox": "flecks dox docusaurus && cd website && DOCUSAURUS_GENERATED_FILES_DIR_NAME=node_modules/.cache/docusaurus npx docusaurus", + "gh-pages": "flecks dox docusaurus && cd website && DOCUSAURUS_GENERATED_FILES_DIR_NAME=node_modules/.cache/docusaurus npx docusaurus build && cd .. && rm -rf gh-pages/* && mv website/build/* gh-pages && rm -rf website/build && cd gh-pages && git add . && git commit -m $(git -C ../website rev-parse HEAD) && git push origin gh-pages", "lint": "node build/tasks npm run -- lint", "publish": "node build/publish --provenance", "test": "node build/tasks npm run -- test",