DOCS Build and publish audio api docs #58
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: DOCS Build and publish audio api docs | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: false | |
jobs: | |
publish: | |
if: github.repository == 'software-mansion/react-native-audio-api' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
- name: Setup Yarn | |
uses: mskelton/setup-yarn@v2 | |
- name: Install dependencies and build the docs | |
run: | | |
cd packages/audiodocs | |
yarn | |
yarn build | |
- name: Upload build files | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: packages/audiodocs/build | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Recrawl search index | |
run: | | |
curl -X POST https://crawler.algolia.com/api/1/crawlers/${{ secrets.CRAWLER_ID }}/reindex \ | |
-H "Content-Type: application/json" \ | |
-u ${{ secrets.CRAWLER_USER_ID }}:${{ secrets.CRAWLER_API_KEY }} | |
- name: Deploy to Github Pages | |
uses: actions/deploy-pages@v4 |