> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# デプロイ

> このガイドでは、この SDK を使用してアプリケーションのデプロイを統合および管理する方法の例を紹介します。GitHub 連携の作成、現在の連携情報の取得、そして client オブジェクトと application オブジェクトの両方を使った最新のデプロイの確認方法を学びます。

## 連携を作成する

<Tabs>
  <Tab title="Using Client">
    ```python theme={null}
    import squarecloud as square

    client = square.Client(api_key='API KEY')


    async def example():
        webhook_url = await client.github_integration(
            'application_id', access_token='access_token'
        )
        print(
            webhook_url
        )
    ```
  </Tab>

  <Tab title="Using Application">
    ```python theme={null}
    import squarecloud as square

    client = square.Client(api_key='API KEY')


    async def example():
        app = await client.app('application_id')
        webhook_url = await app.github_integration(access_token='access_token')
        print(
            webhook_url
        )
    ```
  </Tab>
</Tabs>

## 現在の連携を取得する

<Tabs>
  <Tab title="Using Client">
    ```python theme={null}
    import squarecloud as square

    client = square.Client(api_key='API KEY')


    async def example():
        webhook_url = await client.current_app_integration(
            'application_id',
        )
        print(webhook_url)
    ```
  </Tab>

  <Tab title="Using Application">
    ```python theme={null}
    import squarecloud as square

    client = square.Client(api_key='API KEY')


    async def example():
        app = await client.app('application_id')
        webhook_url = await app.current_integration()
        print(
            webhook_url
        )
    ```
  </Tab>
</Tabs>

## 最新のデプロイ

<Tabs>
  <Tab title="Using Client">
    ```python theme={null}
    import squarecloud as square

    client = square.Client(api_key='API KEY')


    async def example():
        deploys = await client.last_deploys('application_id')
        print(deploys)  # [[DeployData(...), DeployData(...), DeployData(...)]]
    ```
  </Tab>

  <Tab title="Using Application">
    ```python theme={null}
    import squarecloud as square

    client = square.Client(api_key='API KEY')


    async def example():
        app = await client.app('application_id')
        deploys = await app.last_deploys()
        print(deploys)  # [[DeployData(...), DeployData(...), DeployData(...)]]
    ```
  </Tab>
</Tabs>
