diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f9b5cf0..fe74373 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,8 +24,39 @@ jobs: echo "components=$(ls ./components/ | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT + publish-docs: + name: Publish docs + runs-on: ubuntu-22.04 + if: github.ref == 'refs/heads/main' + + permissions: + contents: write + pages: write + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: "3.x" + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate docs + run: pip install pipenv && make docs + + - name: Upload docs + uses: actions/upload-pages-artifact@v1 + with: + path: site/ + + - name: Publish docs + uses: actions/deploy-pages@v2 + publish-component: - name: Publish + name: Publish components runs-on: ubuntu-22.04 needs: setup strategy: @@ -71,29 +102,10 @@ jobs: permissions: contents: write - pages: write - id-token: write steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Install Protoc - uses: arduino/setup-protoc@v1 - with: - version: "3.x" - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Generate docs - run: pip install pipenv && make docs - - - name: Upload docs - uses: actions/upload-pages-artifact@v1 - with: - path: site/ - - - name: Publish docs - uses: actions/deploy-pages@v2 - - name: Create release uses: softprops/action-gh-release@v1