Skip to content

Commit

Permalink
Restore existed workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
saltict committed Jul 2, 2024
1 parent c0c88e2 commit 1fd9425
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/push-webapp.yml
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:
Expand All @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 1fd9425

Please sign in to comment.