Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Sep 17, 2023
1 parent 25ee652 commit 399fa6a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ on:
jobs:
deploy-docs:
runs-on: ubuntu-latest
env:
runtime: ${{ !github.event.inputs.runtime && 'bun'}}
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_call' ||
Expand All @@ -42,33 +44,33 @@ jobs:
uses: actions/checkout@v3

- name: Setup Node
if: github.event.inputs.runtime == 'npm'
if: env.runtime == 'npm'
uses: actions/setup-node@v3
with:
node-version: "latest"
registry-url: https://registry.npmjs.org

- name: Setup bun
if: github.event.inputs.runtime == 'bun'
if: env.runtime == 'bun'
uses: oven-sh/setup-bun@v1

- name: Install package dependencies
run: ${{ github.event.inputs.runtime }} install
run: ${{ env.runtime }} install

- name: Build package (skip cdn file)
run: ${{ github.event.inputs.runtime }} run build:skipcdnfiles
run: ${{ env.runtime }} run build:skipcdnfiles

- name: Install docs dependencies
run: cd src/docs && ${{ github.event.inputs.runtime }} install
run: cd src/docs && ${{ env.runtime }} install

- name: Install daisyUI
run: cd src/docs && ${{ github.event.inputs.runtime }} i daisyui@${{ github.event.inputs.npm-tag }}
run: cd src/docs && ${{ env.runtime }} i daisyui@${{ github.event.inputs.npm-tag }}

- name: Get new data from API
run: cd src/docs && ${{ github.event.inputs.runtime }} run get-files
run: cd src/docs && ${{ env.runtime }} run get-files

- name: Build docs
run: cd src/docs && ${{ github.event.inputs.runtime }} run build
run: cd src/docs && ${{ env.runtime }} run build

- name: Deploy docs to github pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 1 addition & 0 deletions src/docs/src/lib/json/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 399fa6a

Please sign in to comment.