From c1468bd2e6e347ca6a0da15262b56cf852a9a027 Mon Sep 17 00:00:00 2001 From: Stephen Collins Date: Tue, 8 Jul 2025 20:14:02 -0500 Subject: [PATCH] split github workflow yaml files --- .github/workflows/ci.yml | 48 ------------------------------- .github/workflows/deploy-docs.yml | 31 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/deploy-docs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faa0639..275aec8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,8 +7,6 @@ on: - 'v*' pull_request: branches: [main] - release: - types: [published] jobs: lint: @@ -88,49 +86,3 @@ jobs: with: name: python-distributions path: dist - - docs: - runs-on: ubuntu-latest - needs: [test, eval] - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - name: Install uv - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: Install dependencies - run: uv sync --dev - - name: Build documentation - run: uv run mkdocs build - - name: Deploy to Cloudflare Pages - uses: cloudflare/pages-action@v1 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: intentkit-docs - directory: site - gitHubToken: ${{ secrets.GITHUB_TOKEN }} - - publish: - runs-on: ubuntu-latest - needs: build - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - permissions: - contents: write - id-token: write - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - name: Install build and publish dependencies - run: | - pip install build twine - - name: Build package - run: python -m build --sdist --wheel --outdir dist - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..21259cd --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,31 @@ +name: Deploy Docs + +on: + push: + tags: + - 'v*' + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install uv + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + - name: Install dependencies + run: uv sync --dev + - name: Build documentation + run: uv run mkdocs build + - name: Deploy to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: intentkit-docs + directory: site + gitHubToken: ${{ secrets.GITHUB_TOKEN }}