Fiddle: update deployment to go to s3#48
Merged
krishan711 merged 1 commit intomainfrom May 9, 2026
Merged
Conversation
There was a problem hiding this comment.
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 buildstatic 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_NAMEandDIST_DIRused 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 }} |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.