# Deploying

Each portal will be accessible to our players once it has been deployed and approved by the team. When you push updates, these will be instantly reflected in the game.

Your project will get it's very own subdomain which you can share with players, family and friends. For instance `https://crop-boom.sunflower-land.com`

## Approval Process

Reach out to the team if you would like to deploy your portal inside of Sunflower Land or access advanced APIs such as the Mint Arcade Token.

You will be provided with `DEPLOY_KEY_ID` and `DEPLOY_ACCESS_KEY` that will enable you to release changes whenever you push into your forked repo.

## Deploying

Using Github Actions, you can set this up to automatically occur. Crop Boom Example:

```
# Example Portal Deploy
name: Portal deploy

on:
  push:
    branches:
      - main

jobs:
  deploy:
    concurrency: portal-deploy
    environment: develop
    runs-on: ubuntu-latest
    steps:
      - name: Get current date
        id: date
        run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M')"

      - name: Get the current version ref
        id: get_version
        run: echo ::set-output name=VERSION::${GITHUB_SHA}

      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Dependencies
        run: yarn install

      - name: Build
        run: yarn build
        env:
          NODE_OPTIONS: --max-old-space-size=6144
          CI: false

          VITE_PORTAL_APP: "crop-boom"
          VITE_PRIVATE_IMAGE_URL: "https://sunflower-land.com/game-assets"
          VITE_API_URL: "https://api-dev.sunflower-land.com"
          VITE_ROOM_URL: "wss://mmo-dev.sunflower-land.com"
          VITE_PORTAL_GAME_URL: "https://sunflower-land.com/testnet/"

      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v1.5.9
        with:
          aws-access-key-id: ${{ secrets.DEPLOY_KEY_ID }}
          aws-secret-access-key: ${{ secrets.DEPLOY_ACCESS_KEY }}
          aws-region: ap-southeast-2

      - name: Deploy static site to S3 subdomain
        run: aws s3 sync ./dist/ s3://crop-boom.sunflower-land.com --delete
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sunflower-land.com/contributing/portals-ugc/deploying.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
