-
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.
Merge pull request #107 from goodeats/106-deployment
deployment
- Loading branch information
Showing
13 changed files
with
205 additions
and
53 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 |
---|---|---|
|
@@ -6,6 +6,7 @@ SESSION_SECRET="super-duper-s3cret" | |
HONEYPOT_SECRET="super-duper-s3cret" | ||
INTERNAL_COMMAND_TOKEN="some-made-up-token" | ||
RESEND_API_KEY="re_blAh_blaHBlaHblahBLAhBlAh" | ||
RESEND_EMAIL_ADDRESS="[email protected]" | ||
SENTRY_DSN="your-dsn" | ||
|
||
# the mocks and some code rely on these two being prefixed with "MOCK_" | ||
|
@@ -15,3 +16,9 @@ GITHUB_CLIENT_SECRET="MOCK_GITHUB_CLIENT_SECRET" | |
GITHUB_TOKEN="MOCK_GITHUB_TOKEN" | ||
|
||
FLY_APP_NAME="fly-app-name-1234" | ||
|
||
# set this to false to prevent search engines from indexing the website | ||
# default to allow indexing for seo safety | ||
# set false for staging via fly secrets | ||
# https://github.com/epicweb-dev/epic-stack/blob/main/docs/deployment.md | ||
ALLOW_INDEXING="true" |
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 |
---|---|---|
|
@@ -136,48 +136,46 @@ jobs: | |
path: playwright-report/ | ||
retention-days: 30 | ||
|
||
# uncomment when I feel that fly deploy is stable enough | ||
# deploy: | ||
# name: 🚀 Deploy | ||
# runs-on: ubuntu-22.04 | ||
# needs: [lint, typecheck, vitest, playwright] | ||
# # only build/deploy main branch on pushes | ||
# if: | ||
# ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && | ||
# github.event_name == 'push' }} | ||
|
||
# steps: | ||
# - name: ⬇️ Checkout repo | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: 👀 Read app name | ||
# uses: SebRollen/[email protected] | ||
# id: app_name | ||
# with: | ||
# file: 'fly.toml' | ||
# field: 'app' | ||
|
||
# # move Dockerfile to root | ||
# - name: 🚚 Move Dockerfile | ||
# run: | | ||
# mv ./other/Dockerfile ./Dockerfile | ||
# mv ./other/.dockerignore ./.dockerignore | ||
|
||
# - name: 🎈 Setup Fly | ||
# uses: superfly/flyctl-actions/[email protected] | ||
|
||
# - name: 🚀 Deploy Staging | ||
# if: ${{ github.ref == 'refs/heads/dev' }} | ||
# run: | ||
# flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
# --app ${{ steps.app_name.outputs.value }}-staging | ||
# env: | ||
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
# - name: 🚀 Deploy Production | ||
# if: ${{ github.ref == 'refs/heads/main' }} | ||
# run: | ||
# flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
# --build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} | ||
# env: | ||
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
uncomment when I feel that fly deploy is stable enough | ||
deploy: | ||
name: 🚀 Deploy | ||
runs-on: ubuntu-22.04 | ||
needs: [lint, typecheck, vitest, playwright] | ||
# only build/deploy main branch on pushes | ||
if: ${{ github.event_name == 'push' }} | ||
|
||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 👀 Read app name | ||
uses: SebRollen/[email protected] | ||
id: app_name | ||
with: | ||
file: 'fly.toml' | ||
field: 'app' | ||
|
||
# move Dockerfile to root | ||
- name: 🚚 Move Dockerfile | ||
run: | | ||
mv ./other/Dockerfile ./Dockerfile | ||
mv ./other/.dockerignore ./.dockerignore | ||
- name: 🎈 Setup Fly | ||
uses: superfly/flyctl-actions/[email protected] | ||
|
||
- name: 🚀 Deploy Staging | ||
if: ${{ github.ref == 'refs/heads/dev' }} | ||
run: | ||
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
--app ${{ steps.app_name.outputs.value }}-staging | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
- name: 🚀 Deploy Production | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: | ||
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
--build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
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
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 |
---|---|---|
|
@@ -31,7 +31,7 @@ export async function sendEmail({ | |
| { html: string; text: string; react?: never } | ||
| { react: ReactElement; html?: never; text?: never } | ||
)) { | ||
const from = '[email protected]' | ||
const from = process.env.RESEND_EMAIL_ADDRESS | ||
|
||
const email = { | ||
from, | ||
|
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
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
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
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.