Skip to content

Commit

Permalink
Merge branch 'main' into ORAKEI-110-New-contacts-implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewqqiu authored Sep 16, 2024
2 parents 100af76 + 1d9c28a commit bca7db7
Show file tree
Hide file tree
Showing 31 changed files with 3,458 additions and 1,305 deletions.
54 changes: 45 additions & 9 deletions .github/workflows/deploy.staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,51 @@ name: Fly Deploy Staging
on:
push:
branches:
- main
- ORAKEI-Staging

jobs:
deploy-web:
name: Deploy Web
jobs: # remove these tests in production - Anton
test-vars:
name: Test Var
runs-on: ubuntu-latest
environment: Notion
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config fly.staging.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_STAGING_API_TOKEN }}
- name: Test ANTON Secret
run: echo "the name is ${{ secrets.ANTON }}"
- name: Test NOTION_MEMBERS_ID Secret
run: echo "Notion Members ID is ${{ secrets.NOTION_MEMBERS_ID }}"
- name: Test NOTION_TOKEN Secret
run: echo "Notion Token is ${{ secrets.NOTION_TOKEN }}"
- name: Test NOTION_TOKEN Secret
run: echo "Notion Token is ${{ vars.ANTONVAR }}"
- name: Test NOTION_HOMEPAGE Secret
run: echo "Notion Homepage is ${{ secrets.NOTION_HOMEPAGE_ID}}"
- name: Test NOTION_HOMEPAGE Secret
run: echo "Notion NOTION_TEAMS_ID is ${{ secrets.NOTION_TEAMS_ID}}"
- name: Test NOTION_PROJECTS_ID Secret
run: echo "Notion Homepage is ${{ secrets.NOTION_PROJECTS_ID}}"

deploy-web:
name: Deploy Web
runs-on: ubuntu-latest
environment: Notion
env:
# This is probably not needed I just have it here for testing - Anton
FLY_API_TOKEN: ${{ secrets.FLY_STAGING_API_TOKEN }}
ANTON: ${{ secrets.ANTON }}
AntonVar: ${{ vars.ANTONVAR }}
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_MEMBERS_ID: ${{ secrets.NOTION_MEMBERS_ID }}
NOTION_HOMEPAGE_ID: ${{ secrets.NOTION_HOMEPAGE_ID}}
NOTION_TEAMS_ID: ${{ secrets.NOTION_TEAMS_ID }}
WEBFORMS_TOKEN: ${{ secrets.WEBFORMS_TOKEN }}
NOTION_PROJECTS_ID: ${{ secrets.NOTION_PROJECTS_ID}}
steps:

- name: actions checkout v3
uses: actions/checkout@v3

- name: setup flyctl
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Fly deploy
run: flyctl deploy --build-arg ANTON=${{ secrets.ANTON }} --build-arg WEBFORMS_TOKEN=${{ secrets.WEBFORMS_TOKEN }} --build-arg NOTION_MEMBERS_ID=${{ secrets.NOTION_MEMBERS_ID }} --build-arg NOTION_TOKEN=${{ secrets.NOTION_TOKEN }} --build-arg NOTION_PROJECTS_ID=${{ secrets.NOTION_PROJECTS_ID }} --build-arg NOTION_TEAMS_ID=${{ secrets.NOTION_TEAMS_ID}} --build-arg NOTION_HOMEPAGE_ID=${{ secrets.NOTION_HOMEPAGE_ID}} --remote-only --config fly.staging.toml
22 changes: 21 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,26 @@ ENV NODE_ENV="production"
ARG YARN_VERSION=1.22.19
RUN npm install -g yarn@$YARN_VERSION --force

# Define arguments for build time
ARG ANTON
ARG WEBFORMS_TOKEN
ARG NOTION_TOKEN
ARG NOTION_MEMBERS_ID
ARG NOTION_PROJECTS_ID
ARG NOTION_TEAMS_ID
ARG NOTION_HOMEPAGE_ID


# Set build-time environment variables
ENV ANTON=${ANTON}
ENV WEBFORMS_TOKEN=${WEBFORMS_TOKEN}
ENV NOTION_TOKEN=${NOTION_TOKEN}
ENV NOTION_MEMBERS_ID=${NOTION_MEMBERS_ID}
ENV NOTION_PROJECTS_ID=${NOTION_PROJECTS_ID}
ENV NOTION_TEAMS_ID=${NOTION_TEAMS_ID}
ENV NOTION_HOMEPAGE_ID=${NOTION_HOMEPAGE_ID}



# Throw-away build stage to reduce size of final image
FROM base as build
Expand Down Expand Up @@ -44,4 +64,4 @@ COPY --from=build /app/dist /app/dist
COPY --from=build /app/node_modules /app/node_modules

# Start the server by default, this can be overwritten at runtime
CMD [ "node", "/app/dist/server/entry.mjs" ]
CMD [ "node", "/app/dist/server/entry.mjs" ]
Loading

0 comments on commit bca7db7

Please sign in to comment.