diff --git a/.github/workflows/gh-pages-docc.yml b/.github/workflows/gh-pages-docc.yml new file mode 100644 index 00000000000..9348b5c3478 --- /dev/null +++ b/.github/workflows/gh-pages-docc.yml @@ -0,0 +1,30 @@ +name: gh-pages-docc + +on: + workflow_dispatch: + +jobs: + gh-pages-mdbook-build: + name: Build + runs-on: macos-latest + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-west-2 + role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }} + role-session-name: ${{ github.run_id }} + + - name: Build DocC documentation + working-directory: . + run: | + HOSTING_BASE_PATH="maplibre-native/ios/latest" platform/ios/scripts/docc.sh + + - name: Deploy DocC documentation (main) 🚀 + if: github.ref == 'refs/heads/main' + uses: JamesIves/github-pages-deploy-action@v4.7.2 + continue-on-error: true + with: + branch: gh-pages + folder: build/docs + target-folder: ios/latest/ diff --git a/.github/workflows/gh-pages-mdbook.yml b/.github/workflows/gh-pages-mdbook.yml index 1ebce477a66..0862f507d0d 100644 --- a/.github/workflows/gh-pages-mdbook.yml +++ b/.github/workflows/gh-pages-mdbook.yml @@ -1,48 +1,30 @@ -name: Build & Deploy mdBook documentation +name: gh-pages-mdbook on: workflow_dispatch: - push: - branches: - - main - paths: - - 'docs/mdbook/**' jobs: gh-pages-mdbook-build: name: Build - runs-on: ubuntu-latest + runs-on: macos-latest steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - name: Setup mdBook - uses: peaceiris/actions-mdbook@v2 - - name: Install Dependencies - shell: bash - run: sudo apt-get install -y libwayland-dev libxkbcommon-dev # Required for winit - - name: Build - working-directory: docs/mdbook - shell: bash - run: mdbook build - - uses: actions/upload-artifact@v4 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 with: - name: book - path: docs/mdbook/book/ + aws-region: us-west-2 + role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }} + role-session-name: ${{ github.run_id }} - gh-pages-mdbook-deploy: - needs: gh-pages-mdbook-build - name: Deploy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Download book - uses: actions/download-artifact@v4 - with: - name: book - path: artifacts/book - - name: Deploy + - name: Build DocC documentation + working-directory: . + run: | + HOSTING_BASE_PATH="maplibre-native/ios/latest" platform/ios/scripts/docc.sh + + - name: Deploy DocC documentation (main) 🚀 + if: github.ref == 'refs/heads/main' uses: JamesIves/github-pages-deploy-action@v4.7.2 + continue-on-error: true with: branch: gh-pages - folder: artifacts/book - target-folder: docs/book + folder: build/docs + target-folder: ios/latest/