-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update * Update test deployment * Up * Update names * Fix names * Up names * Revert "Up names" This reverts commit c95b974. * Up names * Rem
- Loading branch information
1 parent
9dc4ee0
commit cddd90d
Showing
16 changed files
with
153 additions
and
110 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
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,4 +1,4 @@ | ||
name: Test experiments app | ||
name: ex:tests | ||
on: | ||
pull_request: | ||
branches: | ||
|
@@ -12,7 +12,7 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
experiments-test: | ||
svelte-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -35,8 +35,11 @@ jobs: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
GA_TRACKING_ID: "G-PPE5XD2VKV" | ||
|
||
experiments-deploy-staging: | ||
needs: ["experiments-test"] | ||
deploy-fly-staging: | ||
needs: ["svelte-check"] | ||
environment: | ||
name: pr-${{ github.event.number }}-experiments | ||
url: ${{ steps.deploy.outputs.url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -46,33 +49,14 @@ jobs: | |
node-version: 20 | ||
cache: "npm" | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: npm install | ||
- run: npm install | ||
|
||
- name: Creating static build | ||
run: npm run ex:build:static | ||
env: | ||
GA_TRACKING_ID: "G-PPE5XD2VKV" | ||
|
||
- name: Deploying build | ||
- name: Deploy staging build | ||
id: deploy | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_WORKERS_DEPLOY_API_TOKEN }} | ||
workingDirectory: "packages/experiments/" | ||
command: pages deploy "./build" --branch=${{ github.head_ref }} --project-name=hot-or-not-experiments --commit-dirty=true | ||
uses: superfly/[email protected] | ||
env: | ||
CLOUDFLARE_ACCOUNT_ID: "a209c523d2d9646cc56227dbe6ce3ede" | ||
|
||
- name: Comment preview link on PR | ||
if: github.actor != 'dependabot[bot]' | ||
uses: actions/github-script@v7 | ||
FLY_API_TOKEN: ${{ secrets.FLYIO_KIT_DEPLOY_GH_ACTION }} | ||
FLY_ORG: gobazzinga-inc-584 | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: 'Experiments preview build: ${{ steps.deploy.outputs.previewUrl }}' | ||
}) | ||
name: pr-${{ github.event.number }}-experiments | ||
config: "ex.staging.fly.toml" |
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
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# syntax = docker/dockerfile:1 | ||
|
||
# Adjust NODE_VERSION as desired | ||
ARG NODE_VERSION=18.16.1 | ||
FROM node:${NODE_VERSION}-slim as base | ||
|
||
LABEL fly_launch_runtime="Node.js" | ||
|
||
# Node.js app lives here | ||
WORKDIR /app | ||
|
||
# Set production environment | ||
ENV NODE_ENV="production" | ||
|
||
|
||
# Throw-away build stage to reduce size of final image | ||
FROM base as build | ||
|
||
# Install packages needed to build node modules | ||
RUN apt-get update -qq && \ | ||
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 | ||
|
||
# Copy application code | ||
COPY --link . . | ||
|
||
# Install node modules | ||
RUN npm install --include=dev | ||
|
||
# Build application | ||
RUN npm run ex:build | ||
|
||
# Remove development dependencies | ||
RUN npm prune --omit=dev | ||
|
||
# Final stage for app image | ||
FROM base | ||
|
||
# Copy built application | ||
COPY --from=build /app /app | ||
|
||
# Start the server by default, this can be overwritten at runtime | ||
EXPOSE 3000 | ||
CMD [ "npm", "run", "ex:start" ] |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# fly.toml app configuration file generated for hot-or-not-kit on 2024-01-04T16:13:20+05:30 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = "experiments-kit" | ||
primary_region = "bos" | ||
|
||
[build] | ||
dockerfile = "ex.Dockerfile" | ||
ignorefile = "Dockerfile.dockerignore" | ||
|
||
[http_service] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ["app"] | ||
|
||
[[vm]] | ||
cpu_kind = "shared" | ||
cpus = 1 | ||
memory_mb = 1024 |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# fly.toml app configuration file generated for hot-or-not-kit on 2024-01-04T16:13:20+05:30 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = "experiments-kit-staging" | ||
primary_region = "bos" | ||
|
||
[build] | ||
dockerfile = "ex.Dockerfile" | ||
ignorefile = "Dockerfile.dockerignore" | ||
|
||
[http_service] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ["app"] | ||
|
||
[[vm]] | ||
cpu_kind = "shared" | ||
cpus = 1 | ||
memory_mb = 1024 |
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
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
Oops, something went wrong.