Update UI responsive #373
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
name: Build WebApp Preview | |
on: | |
pull_request: | |
branches: | |
- webapp | |
- webapp-dev | |
push: | |
branches: | |
- webapp | |
- webapp-dev | |
jobs: | |
master: | |
if: "! startsWith(github.event.head_commit.message, '[CI Skip]')" | |
name: Deploy WebApp Preview | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_PAT }} | |
- 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 }} | |
run: | | |
yarn install --immutable | grep -v 'YN0013' | |
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.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name }} | |
directory: './packages/webapp/build' | |
wranglerVersion: '3' | |
- 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 }} |