forked from Koniverse/SubWallet-Extension
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (68 loc) · 2.29 KB
/
push-webapp-test-03.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build Telegram MiniApp 03
on:
pull_request:
branches:
- telegram-dev-03
push:
branches:
- telegram-dev-03
jobs:
master:
if: "!startsWith(github.event.head_commit.message, '[CI Skip]')"
name: Deploy Telegram MiniApp 03
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_AUTOMATION_TOKEN }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- name: Build
env:
TRANSAK_API_KEY: ${{ secrets.TRANSAK_API_KEY }}
COINBASE_PAY_ID: ${{ secrets.COINBASE_PAY_ID }}
NFT_MINTING_HOST: ${{ secrets.NFT_MINTING_HOST }}
BRANCH_NAME: ${{ github.ref_name }}
GAME_API_HOST: ${{ vars.API_DEV_SERVER_3 }}
TELEGRAM_WEBAPP_LINK: ${{ vars.TELEGRAM_WEBAPP_LINK_03 }}
run: |
yarn install --immutable | grep -v 'YN0013'
if [ ${{ github.ref_name }} == 'telegram-wallet' ]; then
yarn run webapp:change-build-number
fi
yarn webapp:build
- name: Publish to Cloudflare Pages
id: cloudflare_deployment
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PAGES_PROJECT_NAME }}
gitHubToken: ${{ secrets.GH_AUTOMATION_TOKEN }}
branch: ${{ github.ref_name }}
directory: './packages/webapp/build'
wranglerVersion: '3'
- if: "github.ref_name == 'telegram-wallet' && github.event_name == 'push'"
name: Automation Bot
uses: EndBug/add-and-commit@v9
with:
author_name: Automation Bot
author_email: [email protected]
message: '[CI Skip] Auto increase webapp build number'
- name: Notify to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}
username: WebApp Worker
title: ${{ github.workflow }}
description: |
The deployment is completed.
- URL: ${{ steps.cloudflare_deployment.outputs.url }}
- Alias: ${{ steps.cloudflare_deployment.outputs.alias }}