forked from near/near-sdk-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a suggestion
typedoc-github-pages.yml
github workflow file
- Loading branch information
1 parent
46b71c7
commit 02ac778
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Deploy TypeDoc to GitBook | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
env: | ||
NODE_VERSION: 18.x | ||
ENTRY_FILE: "packages" | ||
CONFIG_PATH: "tsconfig.base.json" | ||
USES_PNPM: "true" | ||
|
||
jobs: | ||
deploy: | ||
concurrency: ci-${{ github.ref }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 7 | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Build project | ||
run: pnpm build | ||
|
||
- name: Build documentation | ||
run: pnpm docs:generate | ||
|
||
- name: Deploy to GitBook | ||
env: | ||
# The GITBOOK_TOKEN secret should be added to your GitHub repository settings. This token allows the GitHub Actions workflow to push changes to your GitBook repository. | ||
# Replace YOUR_GITBOOK_REPOSITORY with the actual GitBook repository URL. | ||
GITBOOK_TOKEN: ${{ secrets.GITBOOK_TOKEN }} | ||
run: | | ||
git config --global user.name 'GitHub Actions' | ||
git config --global user.email '[email protected]' | ||
git clone --branch=master https://gitbook.com/YOUR_GITBOOK_REPOSITORY.git book | ||
rsync -av --delete docs/ book/ | ||
cd book | ||
git add . | ||
git commit -m "Update documentation" | ||
git push origin master |