Skip to content

Commit

Permalink
Merge pull request #169 from zallo-labs/fix-web-deploy
Browse files Browse the repository at this point in the history
Fix web deploy
  • Loading branch information
hbriese authored Oct 26, 2023
2 parents 11d18e7 + 55ff2bb commit b7c24a9
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 55 deletions.
57 changes: 50 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'

on:
push:
branches-ignore: [main]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
schedule:
- cron: '18 23 * * 5'
- cron: '15 18 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
Expand All @@ -18,21 +38,44 @@ jobs:
strategy:
fail-fast: false
matrix:
# https://git.io/codeql-language-support
language: ['typescript', 'javascript']
language: ['javascript-typescript']
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: '/language:${{matrix.language}}'
22 changes: 6 additions & 16 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: 🚧 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🚧 Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master
Expand All @@ -36,7 +36,7 @@ jobs:

steps:
- name: 🚧 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 200 # Sentry looks for the previous release in the git history

Expand All @@ -62,12 +62,12 @@ jobs:

steps:
- name: 🚧 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🚧 Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: 🚧 Setup Expo
Expand All @@ -82,20 +82,10 @@ jobs:
- name: 🏗️ Prebuild
run: yarn app prebuild

# Updates iOS and Android; web app is deployed via Vercel
- name: 🚀 Publish update
run: yarn app eas update --auto --non-interactive --platform all

app-web:
environment: main - app
runs-on: ubuntu-latest

steps:
- name: 🚀 Deploy
uses: fjogeleit/http-request-action@v1
with:
url: ${{ secrets.WEB_DEPLOY_HOOK }}
method: POST

# docs:
# environment: main - docs
# runs-on: ubuntu-latest
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:

steps:
- name: 🚧 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🚧 Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: 📦 Install
Expand All @@ -32,10 +32,10 @@ jobs:

steps:
- name: 🚧 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🚧 Checkout zksync-local
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: hbriese/zksync-local
path: zksync-local
Expand All @@ -44,9 +44,9 @@ jobs:
run: (cd zksync-local && ./start.sh)

- name: 🚧 Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: 📦 Install
Expand All @@ -66,12 +66,12 @@ jobs:

steps:
- name: 🚧 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🚧 Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: 📦 Install
Expand All @@ -92,12 +92,12 @@ jobs:

steps:
- name: 🚧 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🚧 Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: 💾 Setup EdgeDB
Expand All @@ -122,12 +122,12 @@ jobs:

steps:
- name: 🚧 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🚧 Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: 📦 Install
Expand All @@ -139,17 +139,17 @@ jobs:
- name: 🧪 Test
run: yarn app test

app-web-build-test:
app-web-build:
runs-on: ubuntu-latest

steps:
- name: 🚧 Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🚧 Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: 📦 Install
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.12.1
20.9.0
Binary file not shown.
1 change: 0 additions & 1 deletion app/public/_redirects

This file was deleted.

8 changes: 8 additions & 0 deletions app/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"buildCommand": "yarn build:web",
"outputDirectory": "dist",
"devCommand": "expo",
"cleanUrls": true,
"framework": null,
"rewrites": [{ "source": "/:path*", "destination": "/" }]
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@
"clean": "yarn workspaces foreach run clean"
},
"engines": {
"node": "18.12.1",
"node": "20.9.0",
"yarn": "3.x"
},
"devDependencies": {
"@types/node": "^16.18.40",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"eslint": "^8.49.0",
Expand Down
8 changes: 0 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11602,13 +11602,6 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^16.18.40":
version: 16.18.40
resolution: "@types/node@npm:16.18.40"
checksum: a683930491b4fd7cb2dc7684e32bbeedc4a83fb1949a7b15ea724fbfaa9988cec59091f169a3f1090cb91992caba8c1a7d50315b2c67c6e2579a3788bb09eec4
languageName: node
linkType: hard

"@types/node@npm:^20.2.5":
version: 20.4.5
resolution: "@types/node@npm:20.4.5"
Expand Down Expand Up @@ -41429,7 +41422,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "zallo@workspace:."
dependencies:
"@types/node": ^16.18.40
"@typescript-eslint/eslint-plugin": ^6.7.2
"@typescript-eslint/parser": ^6.7.2
eslint: ^8.49.0
Expand Down

0 comments on commit b7c24a9

Please sign in to comment.