forked from Koniverse/SubWallet-Extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
name: Build WebApp Preview | ||
name: Build Telegram MiniApp | ||
on: | ||
pull_request: | ||
branches: | ||
- webapp | ||
- webapp-dev | ||
- telegram-wallet | ||
|
||
push: | ||
branches: | ||
- webapp | ||
- webapp-dev | ||
- webapp-demo | ||
- telegram-wallet | ||
|
||
jobs: | ||
master: | ||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') || github.ref == 'refs/heads/webapp'" | ||
name: Deploy WebApp Preview | ||
if: "!startsWith(github.event.head_commit.message, '[CI Skip]')" | ||
name: Deploy Telegram MiniApp | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
token: ${{ secrets.GH_AUTOMATION_TOKEN }} | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -32,9 +30,11 @@ jobs: | |
COINBASE_PAY_ID: ${{ secrets.COINBASE_PAY_ID }} | ||
NFT_MINTING_HOST: ${{ secrets.NFT_MINTING_HOST }} | ||
BRANCH_NAME: ${{ github.ref_name }} | ||
GAME_API_HOST: ${{ vars.API_PROD_SERVER }} | ||
TELEGRAM_WEBAPP_LINK: ${{ vars.TELEGRAM_WEBAPP_LINK_PROD }} | ||
run: | | ||
yarn install --immutable | grep -v 'YN0013' | ||
if [ ${{ github.ref_name }} == 'webapp-dev' ]; then | ||
if [ ${{ github.ref_name }} == 'telegram-wallet' ]; then | ||
yarn run webapp:change-build-number | ||
fi | ||
yarn webapp:build | ||
|
@@ -44,18 +44,11 @@ jobs: | |
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: ${{ vars.CLOUDFLARE_PAGES_PROJECT_NAME }} | ||
projectName: ${{ vars.CLOUDFLARE_PAGES_PROJECT_NAME_PROD }} | ||
gitHubToken: ${{ secrets.GH_AUTOMATION_TOKEN }} | ||
branch: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name }} | ||
branch: main | ||
directory: './packages/webapp/build' | ||
wranglerVersion: '3' | ||
- if: "github.ref_name == 'webapp-dev' && 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() | ||
|