Merge pull request #334 from signalwire/nko/ci-install-fern #215
This file contains hidden or 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
| name: publish-docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/heads/main') && github.run_number > 1 }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Install Fern CLI | |
| run: npm install -g fern-api | |
| - name: Build TypeSpec specifications | |
| run: yarn build:specs | |
| - name: Validate Fern configuration | |
| run: yarn fern-check | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| - name: Publish Docs | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| run: npx fern generate --docs --log-level debug |