Skip to content

Commit

Permalink
chore: update GH workflow to deploy docs at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
timurbazhirov committed Dec 25, 2023
1 parent 1398878 commit 94e52f4
Showing 1 changed file with 42 additions and 41 deletions.
83 changes: 42 additions & 41 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,47 +93,6 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

deploy-docs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 20.x
steps:
- uses: actions/checkout@v4
with:
lfs: true

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org

- name: Build
shell: bash -l {0}
run: |
npm install
echo "Building Schemas and Examples"
npm run build:assets-with-docs
echo "List build directory ./docs/js"
ls -l docs/js
- name: Generate Directory Listings
uses: jayanta525/github-pages-directory-listing@v4.0.0
with:
FOLDER: docs/js #directory to generate index

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
# if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/js

publish-js-package:
needs: [run-py-linter, run-py-tests, run-js-tests]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -185,3 +144,45 @@ jobs:
pypi-username: ${{ secrets.PYPI_USERNAME }}
pypi-password: ${{ secrets.PYPI_PASSWORD }}
publish-tag: 'false'

deploy-docs:
needs: publish-py-package
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 20.x
steps:
- uses: actions/checkout@v4
with:
lfs: true

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org

- name: Build
shell: bash -l {0}
run: |
npm install
echo "Building Schemas and Examples"
npm run build:assets-with-docs
echo "List build directory ./docs/js"
ls -l docs/js
- name: Generate Directory Listings
uses: jayanta525/github-pages-directory-listing@v4.0.0
with:
FOLDER: docs/js #directory to generate index

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
# if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/js

0 comments on commit 94e52f4

Please sign in to comment.