Skip to content

Commit

Permalink
Merge pull request #588 from lens-protocol/feat/auto-docs
Browse files Browse the repository at this point in the history
Adding automatic update of documentation
  • Loading branch information
cesarenaldi authored Oct 10, 2023
2 parents 5da36a2 + 5503973 commit 7a9cbb1
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "Create & publish documentation"

on:
pull_request:
branches: [main, "lens-v2"]
types:
- closed

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/[email protected]

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "pnpm"

- run: pnpm install --frozen-lockfile

- run: pnpm build

- run: pnpm lint

- name: Run tests
run: pnpm test
env:
SDK_GATED_TEST_PK: ${{secrets.SDK_GATED_TEST_PK}}
SDK_GATED_TEST_PROFILE_ID: ${{secrets.SDK_GATED_TEST_PROFILE_ID}}
SDK_GATED_TEST_PUBLICATION_ID: ${{secrets.SDK_GATED_TEST_PUBLICATION_ID}}
TESTING_ENV_URL: ${{secrets.TESTING_ENV_URL}}
TESTING_HEADER_KEY: ${{secrets.TESTING_HEADER_KEY}}
TESTING_HEADER_VALUE: ${{secrets.TESTING_HEADER_VALUE}}

- run: pnpm lint:examples

docs:
if: github.event.pull_request.merged == true
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup pnpm for docs
uses: pnpm/[email protected]

- name: Use Node.js for docs
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

- run: pnpm typedoc

- name: Deploy documentation
uses: JamesIves/[email protected]
with:
branch: lens-v2
folder: docs

0 comments on commit 7a9cbb1

Please sign in to comment.