Skip to content

Merge pull request #140 from RuneLabsxyz/1on1-mainnet #12

Merge pull request #140 from RuneLabsxyz/1on1-mainnet

Merge pull request #140 from RuneLabsxyz/1on1-mainnet #12

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno
name: Deploy to slot
on:
push:
branches:
- 'main'
- 'deployment'
permissions:
contents: read
jobs:
slot-deployment:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
- id: setup-dojo
uses: runelabsxyz/setup-dojo@main
with:
version: 'v1.0.0-alpha.13'
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build contract
working-directory: ./contracts
run: sozo build -P slot
- name: Test contract
working-directory: ./contracts
run: sozo test -P slot
if: false # Set this to true when we finally have working tests
- name: Deploy contract
working-directory: ./contracts
run: sozo migrate apply -P slot
env:
DOJO_ACCOUNT_ADDRESS: ${{ secrets.DOJO_ACCOUNT_ADDRESS }}
DOJO_PRIVATE_KEY: ${{ secrets.DOJO_PRIVATE_KEY }}
- name: Install dependencies
working-directory: ./client
run: bun install --frozen-lockfile
- name: Build frontend for slot
run: bun run build
working-directory: ./client
env:
ENV: slot
# Force the auto bundler to prepare for cloudflare (otherwise it does weird things)
CF_PAGES: '1'
# For now, isok, but getting an official file at some point would be nice:
PUBLIC_TORII_URL: https://api.cartridge.gg/x/octoguns-public-alpha1/torii
PUBLIC_RPC_URL: https://api.cartridge.gg/x/octoguns-public-alpha1/katana
PUBLIC_WORLD_ADDRESS: "0x7447477a7c852c946f0b8d13ebdfe0db9e78f3de60ab799320691502b4d32a3"
PUBLIC_BURNER_ADDRESS: "0x516d934ae97ba2b708131d9ae1a9a877ee6ef486358e43641602e413f4a28c4"
PUBLIC_BURNER_KEY: "0x70394329654e1673bd368495c64a14d29bdf0887d61ae9d5fb82678aca4572d"
- name: Deploy to cloudflare pages
working-directory: ./client
run: bun wrangler pages deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}