### Clone and Run TON Connect React UI Example
Source: https://docs.ton.org/mandarin/v3/guidelines/ton-connect/quick-start
Commands to clone a minimal React UI example for TON Connect from GitHub, install its dependencies, and run the development server. This allows for local testing of the integration.
```bash
git clone https://github.com/memearchivarius/react-ui-example.git
cd react-ui-example
npm install
npm run dev # default on http://localhost:5173
```
--------------------------------
### Clone and Run TON Connect React Example Locally
Source: https://docs.ton.org/ru/v3/guidelines/ton-connect/quick-start
This set of commands clones the minimal `react-ui-example` repository, installs its dependencies, and starts the development server. This allows you to test TON Connect functionality locally, typically on `http://localhost:5173`.
```bash
git clone https://github.com/memearchivarius/react-ui-example.git
cd react-ui-example
npm install
npm run dev # default on http://localhost:5173
```
--------------------------------
### HTML Sandbox for TON Connect Testing
Source: https://docs.ton.org/ru/v3/guidelines/ton-connect/quick-start
This single-file HTML example provides a quick way to test TON Connect functionality without a complex setup. It includes the TON Connect UI minified script, a button to trigger transactions, and basic JavaScript to initialize the UI and handle transaction sending.
```html
TON Connect sandbox
```
--------------------------------
### Install Dependencies and Run Dev Server - yarn
Source: https://docs.ton.org/develop/dapps/telegram-apps/app-examples
Installs project dependencies and starts the development server using yarn. The `--host` flag allows access from other devices on the network.
```bash
# or yarn
yarn
yarn dev --host
```
--------------------------------
### Install Dependencies and Run Dev Server - npm
Source: https://docs.ton.org/develop/dapps/telegram-apps/app-examples
Installs project dependencies and starts the development server using npm. The `--host` flag allows access from other devices on the network.
```bash
# npm
npm install
npm run dev --host
```
--------------------------------
### HTML Sandbox for TON Connect Testing
Source: https://docs.ton.org/mandarin/v3/guidelines/ton-connect/quick-start
A single-file HTML example for quick testing of TON Connect. It includes the TON Connect UI library, a button to initiate transactions, and event listeners for status changes and button clicks.
```html
TON Connect sandbox
```
--------------------------------
### Minimal TON Connect React Integration
Source: https://docs.ton.org/ru/v3/guidelines/ton-connect/quick-start
This minimal React example demonstrates how to set up TON Connect UI. It wraps the application with `TonConnectUIProvider`, providing the manifest URL, and displays a `TonConnectButton` for users to connect their wallets. Once connected, you can send transactions.
```typescript
import { TonConnectUIProvider, TonConnectButton } from '@tonconnect/ui-react';
export default function App() {
return (
);
}
```
--------------------------------
### Install and Run Vite Development Server
Source: https://docs.ton.org/v3/guidelines/dapps/tma/tutorials/app-examples
Installs project dependencies and starts the Vite development server. The `--host` flag makes the development server accessible via an IP address, useful for testing on different devices. Requires npm or yarn.
```bash
# npm
npm install
npm run dev --host
# or yarn
yarn
yarn dev --host
```
--------------------------------
### Minimal React Example for TON Connect
Source: https://docs.ton.org/mandarin/v3/guidelines/ton-connect/quick-start
A basic React component demonstrating how to set up TON Connect using `TonConnectUIProvider` and display a `TonConnectButton`. It requires a `manifestUrl` to be provided.
```typescript
import { TonConnectUIProvider, TonConnectButton } from '@tonconnect/ui-react';
export default function App() {
return (
);
}
```
--------------------------------
### Run MyTonCtrl Console
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/full-node
Starts the MyTonCtrl console. This command should be run from the local user account used for installation.
```bash
mytonctrl
```
--------------------------------
### Start API and Database with Docker Compose
Source: https://docs.ton.org/mandarin/v3/guidelines/dapps/asset-processing/compressed-nfts
Starts the API and database services defined in the docker-compose.yml file in detached mode. Ensures the necessary backend services are running.
```bash
docker-compose up -d db api
```
--------------------------------
### Install SSL Plugin for Vite - bun
Source: https://docs.ton.org/develop/dapps/telegram-apps/app-examples
Installs the basic SSL plugin for Vite using bun. This plugin is necessary for enabling HTTPS during development, required for certain Telegram Web versions.
```bash
bun add @vitejs/plugin-basic-ssl
```
--------------------------------
### Install TON Libraries with go get
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/liteserver-node
Installs the necessary TON-related Go modules using 'go get'. This includes 'tonutils-go' and its 'lite' and 'ton' sub-packages for Golang integration.
```bash
go get github.com/xssnick/tonutils-go
go get github.com/xssnick/tonutils-go/lite
go get github.com/xssnick/tonutils-go/ton
```
--------------------------------
### Get Address Balance
Source: https://docs.ton.org/mandarin/v3/guidelines/dapps/apis-sdks/getblock-ton-api
This example shows how to retrieve the balance of a specific TON address using the `getAddressBalance` method via a GET request.
```APIDOC
## GET /getAddressBalance
### Description
Retrieves the balance of a specified TON address in nanotons.
### Method
GET
### Endpoint
`https://go.getblock.io/[ACCESS-TOKEN]/getAddressBalance`
### Parameters
#### Query Parameters
- **address** (string) - Required - The TON address for which to retrieve the balance.
### Request Example
```bash
curl --location --request GET 'https://go.getblock.io/[ACCESS-TOKEN]/getAddressBalance?address=EQDXZ2c5LnA12Eum-DlguTmfYkMOvNeFCh4rBD0tgmwjcFI-'
--header 'Content-Type: application/json'
```
### Response
#### Success Response (200)
- **balance** (string) - The balance of the address in nanotons.
```
--------------------------------
### Initialize Project with Package Managers
Source: https://docs.ton.org/v3/guidelines/dapps/tutorials/nft-minting-guide
Commands to initialize a new project using npm, Yarn, pnpm, or Bun. These commands set up the basic project structure and configuration files.
```bash
npm init -y
yarn init -y
pnpm init -y
bun init -y
```
--------------------------------
### MyTonCtrl: Get Config Command
Source: https://docs.ton.org/v3/documentation/nodes/mytonctrl/overview
Retrieves and displays the JSON representation of a specified configuration ID in MyTonCtrl. The config ID can be omitted. Example provided for getting configuration ID 0.
```shell
MyTonCtrl> getconfig # config id can be omitted
```
```shell
MyTonCtrl> getconfig 0
```
--------------------------------
### MyTonCtrl: Get Setting Command
Source: https://docs.ton.org/v3/documentation/nodes/mytonctrl/overview
Retrieves the value of a specific setting in MyTonCtrl, returning it in JSON format. Requires the setting name as an argument. Example provided for getting the 'stake' setting.
```shell
MyTonCtrl> get
```
```shell
MyTonCtrl> get stake
```
--------------------------------
### Clone and Run TON Connect React Demo (Git/npm)
Source: https://docs.ton.org/v3/guidelines/ton-connect/quick-start
This sequence of commands clones the minimal `react-ui-example` repository, navigates into the directory, installs dependencies, and runs the development server. This allows you to test TON Connect features locally, often on `http://localhost:5173`.
```bash
git clone https://github.com/memearchivarius/react-ui-example.git
cd react-ui-example
npm install
npm run dev # default on http://localhost:5173
```
--------------------------------
### Initialize GameFi SDK Instance
Source: https://docs.ton.org/v3/guidelines/dapps/tutorials/web3-game-example
Set up the GameFi SDK and create an instance for client-side interaction with the blockchain. This involves configuring network, manifest URL, Telegram Mini App return URL, content resolver, and merchant details for in-game purchases.
```javascript
import { GameFi } from '@ton/phaser-sdk'
const gameFi = await GameFi.create({
network: 'testnet'
connector: {
// if tonconnect-manifest.json is placed in the root you can skip this option
manifestUrl: '/assets/tonconnect-manifest.json',
actionsConfiguration: {
// address of your Telegram Mini App to return to after the wallet is connected
// url you provided to BothFather during the app creation process
// to read more please read https://github.com/ton-community/flappy-bird#telegram-bot--telegram-web-app
twaReturnUrl: URL_YOU_ASSIGNED_TO_YOUR_APP
},
contentResolver: {
// some NFT marketplaces don't support CORS, so we need to use a proxy
// you are able to use any format of the URL, %URL% will be replaced with the actual URL
urlProxy: `${YOUR_BACKEND_URL}/${PROXY_URL}?url=%URL%`
},
// where in-game purchases come to
merchant: {
// in-game jetton purchases (FLAP)
// use address you got running `assets-cli deploy-jetton`
jettonAddress: FLAP_ADDRESS,
// in-game TON purchases
// use master wallet address you got running `assets-cli setup-env`
tonAddress: MASTER_WALLET_ADDRESS
}
},
})
```
--------------------------------
### Tolk Address Type Example
Source: https://docs.ton.org/mandarin/v3/documentation/smart-contracts/tolk/language-guide
Illustrates the usage of the dedicated `address` type in Tolk for blockchain addresses, including checking if it's internal and getting the workchain.
```Tolk
val addr = address("EQDKbjIcfM6ezt8KjKJJLshZJJSqX7XOA4ff-W72r5gqPrHF");
if (addr.isInternal()) {
var workchain = addr.getWorkchain();
}
```
--------------------------------
### MyTonCtrl: About Mode Command
Source: https://docs.ton.org/v3/documentation/nodes/mytonctrl/overview
Provides a description of a specified mode in MyTonCtrl. Requires the mode name as an argument. Example provided for getting information about the 'validator' mode.
```shell
MyTonCtrl> about
```
```shell
MyTonCtrl> about validator
```
--------------------------------
### Install GameFi SDK for Phaser
Source: https://docs.ton.org/v3/guidelines/dapps/tutorials/web3-game-example
Install the GameFi SDK for Phaser using npm. This is a beta version, so ensure your project is compatible with beta packages.
```bash
npm install --save @ton/phaser-sdk@beta
```
--------------------------------
### Clone Repository and Set Up Directory
Source: https://docs.ton.org/ru/v3/guidelines/dapps/asset-processing/compressed-nfts
This command clones the specified GitHub repository to your local machine, providing all necessary source files for the project. After cloning, you navigate into the newly created project directory.
```bash
git clone https://github.com/nessshon/cnft-toolbox
cd cnft-toolbox
```
--------------------------------
### Owner List Preparation Example
Source: https://docs.ton.org/mandarin/v3/guidelines/dapps/asset-processing/compressed-nfts
This text file lists the wallet addresses of NFT owners, with each address on a new line. The order corresponds to the NFT item index, starting from 0.
```text
UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K
UQCDrgGaI6gWK-qlyw69xWZosurGxrpRgIgSkVsgahUtxZR0
```
--------------------------------
### Basic Go 'Hello, TON!' Example
Source: https://docs.ton.org/v3/guidelines/smart-contracts/howto/wallet
A minimal Go program that prints 'Hello, TON!' to the console. This is a basic test to ensure the Go environment and TON libraries are correctly set up.
```go
package main
import (
"log"
)
func main() {
log.Println("Hello, TON!")
}
```
--------------------------------
### Navigate to Project Directory and Install Dependencies
Source: https://docs.ton.org/mandarin/v3/guidelines/quick-start/developing-smart-contracts/setup-environment
After creating the project template, this command changes the current directory to the newly created project folder and then installs all necessary dependencies defined in the project's package.json file. This step is crucial before running any build or test commands.
```shell
cd ./Example
npm install
```
--------------------------------
### TON Get Method: get_total (Tact Example)
Source: https://docs.ton.org/v3/guidelines/smart-contracts/get-methods
A simple get method that loads and returns a 32-bit unsigned integer from the contract's data. This is a basic example demonstrating data retrieval from contract storage.
```tact
(int) get_total() method_id {
return get_data().begin_parse().preload_uint(32); ;; load and return the 32-bit number from the data
}
```
--------------------------------
### Main Entry Point for TON Project
Source: https://docs.ton.org/v3/guidelines/dapps/tutorials/nft-minting-guide
Initializes the TON project by loading environment variables, opening a wallet using the 'openWallet' function, and calling the main 'init' function. It requires 'dotenv' for configuration and './utils' for wallet operations. The function is immediately invoked.
```typescript
import * as dotenv from "dotenv";
import { openWallet } from "./utils";
import { readdir } from "fs/promises";
dotenv.config();
async function init() {
const wallet = await openWallet(process.env.MNEMONIC!.split(" "), true);
}
void init();
```
--------------------------------
### Build Tonutils Reverse Proxy for All OS (Go Environment)
Source: https://docs.ton.org/v3/guidelines/web3/ton-proxy-sites/how-to-run-ton-site
Builds the Tonutils Reverse Proxy binary for all supported operating systems using the make command. This is useful for cross-compilation after cloning the repository and setting up a Go environment.
```bash
make all
```
--------------------------------
### Download and Install MyTonCtrl Script
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/archive-node
Downloads the MyTonCtrl installation script from GitHub and executes it with superuser privileges. This command installs the MyTonCtrl tool, which is used to manage TON nodes.
```bash
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
sudo bash install.sh
```
--------------------------------
### 构建项目 - npm
Source: https://docs.ton.org/mandarin/v3/guidelines/dapps/tutorials/mint-your-first-token
此命令用于构建项目,将源代码编译成可在生产环境中使用的格式。它适用于使用 npm 作为构建脚本管理器的 Node.js 项目。
```bash
npm run build
```
--------------------------------
### Create and Run Blueprint Project
Source: https://docs.ton.org/v3/guidelines/smart-contracts/testing/overview
Steps to create a new Blueprint project using npm and then run the default tests using npx. This sets up the testing environment for smart contracts.
```bash
npm create ton@latest MyProject
cd MyProject
npx blueprint test
```
--------------------------------
### Install Liteserver with MyTonCtrl (Root Execution)
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/liteserver-node
Installs the MyTonCtrl script with the liteserver mode enabled, executing the installation script as the root user.
```bash
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
su root -c 'bash ./install.sh -m liteserver'
```
--------------------------------
### Install ZFS Utilities - Debian/Ubuntu
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/archive-node
Installs the necessary ZFS utilities package on Debian-based systems. This is a prerequisite for managing ZFS storage pools and filesystems.
```bash
sudo apt install zfsutils-linux
```
--------------------------------
### HTML Sandbox for TON Connect Testing (HTML/JavaScript)
Source: https://docs.ton.org/v3/guidelines/ton-connect/quick-start
This single-file HTML example provides a quick way to test TON Connect functionality without a full React setup. It includes the TON Connect UI library via CDN, a button for connection, and a button to send a transaction, demonstrating basic wallet interaction.
```html
TON Connect sandbox
```
--------------------------------
### Get MyTonCtrl Setting Value
Source: https://docs.ton.org/ru/v3/documentation/nodes/mytonctrl/overview
Retrieves the value of a specific setting in JSON format. You need to provide the setting name as an argument. For example, to get the 'stake' setting, you would use 'get stake'.
```shell
MyTonCtrl> get
```
```shell
MyTonCtrl> get stake
```
--------------------------------
### Prepare Build Directory for Circuits
Source: https://docs.ton.org/mandarin/v3/guidelines/dapps/tutorials/zero-knowledge-proofs
Create a 'build/circuits' directory within the 'simple-zk' project and navigate into it. This directory will store compiled circuit artifacts.
```bash
mkdir -p ./build/circuits
cd ./build/circuits
```
--------------------------------
### GitHub Actions Workflow for Deploying to GitHub Pages
Source: https://docs.ton.org/v3/guidelines/dapps/tma/tutorials/app-examples
This workflow automates the build and deployment of a static website to GitHub Pages. It checks out the code, sets up Node.js, installs dependencies, builds the project, configures GitHub Pages, uploads the build artifact, and deploys to GitHub Pages. Requires Node.js and npm.
```yaml
name: Deploy to GitHub Pages
# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: './'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload dist repository
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
```
--------------------------------
### Install TON HTTP API (macOS)
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/running-a-local-ton
Installs Python 3, ensures pip is upgraded, and then installs the ton-http-api package using Homebrew and pip. This setup is for macOS users.
```shell
# macOS Installation
brew install -q python3
python3 -m ensurepip --upgrade
pip3 install --user ton-http-api
```
--------------------------------
### Install MyTonCtrl in 'only-mtc' Mode (Bash)
Source: https://docs.ton.org/mandarin/v3/guidelines/nodes/maintenance-guidelines/mytonctrl-remote-controller
Installs MyTonCtrl in 'only-mtc' mode on the controller server using a backup archive from the node server. This command installs only the MyTonCtrl controller, not the TON node.
```bash
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
```
```bash
sudo bash install.sh -p /home/user/mytonctrl_backup_hostname_timestamp.tar.gz -o
```
--------------------------------
### Start Project Development Server (Shell)
Source: https://docs.ton.org/v3/guidelines/dapps/tutorials/nft-minting-guide
Commands to start the development server for the TON NFT project using different package managers. This is typically used to run the application locally for testing and development.
```shell
yarn start
```
```shell
yarn start
```
```shell
yarn start
```
```shell
yarn start
```
--------------------------------
### Install TON Libraries with pip
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/liteserver-node
Installs the 'pytonlib' Python package, enabling interaction with the TON blockchain for Python developers.
```bash
pip install pytonlib
```
--------------------------------
### Download and Execute Tonutils Reverse Proxy on Linux
Source: https://docs.ton.org/ru/v3/guidelines/web3/ton-proxy-sites/how-to-run-ton-site
This snippet covers downloading the Tonutils Reverse Proxy binary for Linux, making it executable, and then running it with a specified domain. It requires `wget` and `chmod` utilities. The output includes a QR code for domain binding via a wallet transaction.
```bash
wget https://github.com/ton-utils/reverse-proxy/releases/latest/download/tonutils-reverse-proxy-linux-amd64
chmod +x tonutils-reverse-proxy-linux-amd64
./tonutils-reverse-proxy-linux-amd64 --domain your-domain.ton
```
--------------------------------
### Set up Master Wallet using Assets CLI
Source: https://docs.ton.org/v3/guidelines/dapps/tutorials/web3-game-example
Initializes the environment for the assets-sdk, including creating a master wallet. This wallet manages jettons, NFTs, SBTs, and receives payments. Configuration includes network (testnet), wallet type (highload-v2), and storage (Pinata).
```bash
assets-cli setup-env
```
--------------------------------
### Tolk Fixed-Width Integers Example
Source: https://docs.ton.org/mandarin/v3/documentation/smart-contracts/tolk/language-guide
Provides examples of using fixed-width integer types like `int32` and `uint64` in Tolk variable declarations.
```Tolk
var smallInt: int32 = 42;
var bigInt: uint64 = 1000000;
```
--------------------------------
### Create New TON Project
Source: https://docs.ton.org/mandarin/v3/documentation/smart-contracts/tolk/environment-setup
Initializes a new TON project using npm. Requires Node.js v16 or higher. Prompts for project name and contract template selection.
```bash
npm create ton@latest
```
--------------------------------
### Tolk Function Declaration Examples
Source: https://docs.ton.org/mandarin/v3/documentation/smart-contracts/tolk/language-guide
Provides examples of Tolk function declarations, including functions with different return types and a main function.
```Tolk
fun parseData(cs: slice): cell { }
fun loadStorage(): (cell, int) { }
fun main() { ... }
```
--------------------------------
### 构建项目 - Bun
Source: https://docs.ton.org/mandarin/v3/guidelines/dapps/tutorials/mint-your-first-token
此命令用于构建项目,将源代码编译成可在生产环境中使用的格式。它适用于使用 Bun 作为构建脚本管理器的 Node.js 项目。
```bash
bun run build
```
--------------------------------
### Create TON Connect Manifest JSON
Source: https://docs.ton.org/ru/v3/guidelines/ton-connect/quick-start
A TON Connect manifest is a JSON file that allows wallets to discover your DApp. It requires fields for the DApp's URL, name, and icon URL, with optional fields for terms of use and privacy policy. Wallets can fetch this file using a simple GET request.
```json
{
"url": "",
"name": "",
"iconUrl": "",
"termsOfUseUrl": "",
"privacyPolicyUrl": ""
}
```
--------------------------------
### TON Connect Manifest Example
Source: https://docs.ton.org/develop/dapps/ton-connect/manifest
An example of a `tonconnect-manifest.json` file, illustrating how to populate the fields with actual application details. This serves as a practical reference for your own manifest file.
```json
{
"url": "https://ton.vote",
"name": "TON Vote",
"iconUrl": "https://ton.vote/logo.png"
}
```
--------------------------------
### Install TON Libraries with npm
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/liteserver-node
Installs the 'ton-core' and 'ton-lite-client' npm packages, which are essential for interacting with the TON blockchain using JavaScript.
```bash
npm i --save ton-core ton-lite-client
```
--------------------------------
### Verify Node.js and npm Installation
Source: https://docs.ton.org/mandarin/v3/guidelines/quick-start/developing-smart-contracts/setup-environment
These commands verify that Node.js and its package manager, npm, are correctly installed on your system. Successful execution shows the installed versions, confirming the environment is ready for Node.js-based development.
```shell
npm -v
node -v
```
--------------------------------
### Install UFW Firewall Utility
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/liteserver-node
Installs the Uncomplicated Firewall (ufw) utility on Debian-based systems. This is a prerequisite for managing firewall rules.
```bash
sudo apt update
sudo apt install ufw
```
--------------------------------
### Enable Liteserver Mode in MyTonCtrl
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/liteserver-node
Enables the liteserver mode for an existing MyTonCtrl installation. This command is run interactively after MyTonCtrl is installed.
```bash
user@system:~# mytonctrl
MyTonCtrl> enable_mode liteserver
```
--------------------------------
### Install Dependencies with Package Managers
Source: https://docs.ton.org/v3/guidelines/dapps/tutorials/mint-your-first-token
Installs project dependencies using npm, Yarn, pnpm, or Bun. Ensure you have the respective package manager installed and configured.
```bash
npm install
```
```bash
yarn install
```
```bash
pnpm install
```
```bash
bun install
```
--------------------------------
### Install Liteserver with MyTonCtrl (Ubuntu/Debian)
Source: https://docs.ton.org/v3/guidelines/nodes/running-nodes/liteserver-node
Installs the MyTonCtrl script with the liteserver mode enabled. It downloads the script and executes it with sudo privileges.
```bash
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
sudo bash ./install.sh -m liteserver
```
--------------------------------
### GitHub Actions Workflow for GitHub Pages Deployment
Source: https://docs.ton.org/ru/v3/guidelines/dapps/tma/tutorials/app-examples
This YAML file defines a GitHub Actions workflow to automate the deployment of static content to GitHub Pages. It includes steps for checking out code, setting up Node.js, installing dependencies, building the project, and deploying the artifact to GitHub Pages.
```yaml
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ['master']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: './'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload dist repository
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
```
--------------------------------
### MyTonCtrl: Remove Version File (Root Install)
Source: https://docs.ton.org/v3/guidelines/nodes/nodes-troubleshooting
This command removes the VERSION file located in the MyTonCtrl installation directory when MyTonCtrl was installed by the root user. This is a solution for the 'Found new version of mytonctrl! Migrating!' error after an update.
```Shell
rm /usr/local/bin/mytonctrl/VERSION.
```
--------------------------------
### Build Tonutils Reverse Proxy from Source on Other OS
Source: https://docs.ton.org/ru/v3/guidelines/web3/ton-proxy-sites/how-to-run-ton-site
This snippet shows how to clone the Tonutils Reverse Proxy repository and build the project from source using `make`. This process requires a Go programming environment and is suitable for operating systems other than Linux. The `make build` command compiles the project, and `make all` can be used for building for different systems.
```bash
git clone https://github.com/tonutils/reverse-proxy.git
cd reverse-proxy
make build
```