-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ build docs step moved out from ci
- Loading branch information
1 parent
c0e3c40
commit 8c2db5a
Showing
3 changed files
with
69 additions
and
55 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: CI | ||
name: CI ⚙️ | ||
|
||
on: | ||
push: | ||
|
@@ -136,55 +136,4 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: pnpm semantic-release | ||
|
||
build_docs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
needs: [release] | ||
steps: | ||
- name: Checkout 🧳 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js 🔥 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install pnpm 👀 | ||
uses: pnpm/action-setup@v3 | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory 🏪 | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- name: Setup pnpm cache 💰 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies ⏬ | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Build Docs ⏰ | ||
run: pnpm build:docs | ||
|
||
- name: Commit and Push 🚀 | ||
if: always() | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: 'docs: :rocket: docs updated [skip ci]' | ||
commit_user_name: FindingAkash | ||
commit_user_email: [email protected] | ||
commit_author: FindingAkash <[email protected]> | ||
run: pnpm semantic-release |
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,67 @@ | ||
name: Build and Deploy Docs 📚 | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🧳 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js 🔥 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install pnpm 👀 | ||
uses: pnpm/action-setup@v3 | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory 🏪 | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- name: Setup pnpm cache 💰 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies ⏬ | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Build Docs ⏰ | ||
run: pnpm run build:docs | ||
|
||
- name: Upload Pages Artifact ☁️ | ||
uses: actions/upload-pages-artifact@v2 | ||
id: deployment | ||
with: | ||
path: ./docs # This should be your TypeDoc "out" path. | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages 🚀 | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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