Skip to content

Fiddle: update deployment to go to s3#48

Merged
krishan711 merged 1 commit intomainfrom
updatedep
May 9, 2026
Merged

Fiddle: update deployment to go to s3#48
krishan711 merged 1 commit intomainfrom
updatedep

Conversation

@krishan711
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 9, 2026 19:04
@krishan711 krishan711 changed the title Fiddle: update deployment Fiddle: update deployment to go to s3 May 9, 2026
@krishan711 krishan711 merged commit a1d6c21 into main May 9, 2026
4 checks passed
@krishan711 krishan711 deleted the updatedep branch May 9, 2026 19:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the CI/CD pipelines to build and deploy a static version of the site (Node-based build) instead of building/publishing a Docker image and redeploying over SSH.

Changes:

  • Replace PR workflow Docker build with a Node 20 + npm ci + npm run build static site build.
  • Replace main-branch deployment from GHCR/SSH Docker rollout to an S3 sync + CloudFront invalidation flow.
  • Add workflow-level env vars for DOMAIN_NAME and DIST_DIR used by the deploy job.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/pull-request.yml Switch PR CI from Docker image build to Node-based static site build.
.github/workflows/deploy.yml Switch deployment from Docker+SSH to S3 sync and CloudFront invalidation with Node-based build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: |
aws cloudfront create-invalidation \
--distribution-id ${{ secrets.SITE_DEPLOYMENT_CLOUDFRONT_ID }} \
--paths "/${{ env.DOMAIN_NAME }}/*"
Comment on lines +24 to +29
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
context: .
push: true
cache-from: type=gha,scope=app
cache-to: type=gha,mode=max,scope=app
tags: ${{ env.DOCKER_IMAGE }}
run-app:
needs: deploy-app
runs-on: ubuntu-latest
env:
NAME: tokenpage-landing-app
DOCKER_IMAGE: ghcr.io/${{ github.repository }}-app:latest
steps:
- name: executing remote ssh commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.MDTPBOX_URL }}
username: ${{ secrets.MDTPBOX_USER }}
key: ${{ secrets.MDTPBOX_SSH_KEY }}
port: ${{ secrets.MDTPBOX_PORT }}
envs: DOCKER_IMAGE,NAME
script_stop: true
script: |
url="www.tokenpage.xyz"
docker pull ${DOCKER_IMAGE}
docker stop ${NAME} && docker rm ${NAME} || true
docker run \
--name ${NAME} \
--detach \
--publish-all \
--restart unless-stopped \
--env NAME=${NAME} \
--env VIRTUAL_HOST=${url} \
--env LETSENCRYPT_HOST=${url} \
--env-file ~/.${NAME}.vars \
${DOCKER_IMAGE}
aws-access-key-id: ${{ secrets.SITE_DEPLOYER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SITE_DEPLOYER_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.SITE_DEPLOYER_AWS_REGION }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants