Skip to content

Commit

Permalink
chore: remove deploy for now
Browse files Browse the repository at this point in the history
  • Loading branch information
khanti42 committed Nov 25, 2024
1 parent 60fd7ed commit 70d5841
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 121 deletions.
90 changes: 1 addition & 89 deletions .github/workflows/deploy-wallet-get-starknet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,92 +79,4 @@ jobs:
./packages/get-starknet/dist/webpack
./packages/wallet-ui/build
./node_modules/.yarn-state.yml
key: ${{ needs.prepare-deployment.outputs.CACHE_KEY }}

deploy-wallet-ui:
runs-on: ubuntu-latest
needs:
- prepare-deployment
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
- name: Restore Cached Build
uses: actions/cache@v3
id: restore-build
with:
path: |
./packages/get-starknet/dist/webpack
./packages/wallet-ui/build
./node_modules/.yarn-state.yml
key: ${{ needs.prepare-deployment.outputs.CACHE_KEY }}
- name: Deploy to AWS
run: |
echo "Deployed Dapp to : $AWS_S3_URL"
aws s3 sync ./packages/wallet-ui/build "$AWS_S3_URL"
env:
AWS_S3_URL: ${{ needs.prepare-deployment.outputs.AWS_S3_URL }}

deploy-get-starknet:
runs-on: ubuntu-latest
needs:
- prepare-deployment
- install-build
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
- name: Restore Cached Build
uses: actions/cache@v3
id: restore-build
with:
path: |
./packages/get-starknet/dist/webpack
./packages/wallet-ui/build
./node_modules/.yarn-state.yml
key: ${{ needs.prepare-deployment.outputs.CACHE_KEY }}
- name: Deploy to AWS
run: |
echo "Deployed get Starknet to : $AWS_S3_GET_STARKNET_URL"
aws s3 sync ./packages/get-starknet/dist/webpack "$AWS_S3_GET_STARKNET_URL"
env:
AWS_S3_GET_STARKNET_URL: ${{ needs.prepare-deployment.outputs.AWS_S3_GET_STARKNET_URL }}

invalid-aws-cdn-cache:
runs-on: ubuntu-latest
needs:
- deploy-wallet-ui
- deploy-get-starknet
- prepare-deployment
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Invalid AWS CDN Cache
run: |
echo "Distribution ID : $AWS_CLOUDFRONT_DISTRIBUTIONS_ID"
echo "$AWS_CLOUDFRONT_DISTRIBUTIONS_ID" | tr ',' '\n' | while read -r DISTRIBUTIONS_ID
do
echo "Processing Distribution ID : $DISTRIBUTIONS_ID"
INVALIDED_ID="$(aws cloudfront create-invalidation --distribution-id "$DISTRIBUTIONS_ID" --paths "/starknet/*" | grep Id | awk -F'"' '{ print $4}')"
echo "Waiting for invalidation $INVALIDED_ID"
aws cloudfront wait invalidation-completed --id "$INVALIDED_ID" --distribution-id "$DISTRIBUTIONS_ID"
echo "Invalidation $INVALIDED_ID completed"
done
env:
AWS_CLOUDFRONT_DISTRIBUTIONS_ID: ${{ needs.prepare-deployment.outputs.AWS_CLOUDFRONT_DISTRIBUTIONS_ID }}
key: ${{ needs.prepare-deployment.outputs.CACHE_KEY }}
33 changes: 1 addition & 32 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,35 +113,4 @@ jobs:
run: |
npm pack ./packages/starknet-snap --tag "$TAG" --access public
env:
TAG: ${{ needs.prepare-deployment.outputs.TAG }}

publish-npm:
runs-on: ubuntu-latest
needs:
- publish-npm-dry-run
- prepare-deployment
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Restore Cached Build
uses: actions/cache@v3
id: restore-build
with:
# add /packages/snap/snap.manifest.json to include an updated shasum from build due to version update in auto PR
path: |
./packages/starknet-snap/package.json
./packages/starknet-snap/dist
./packages/starknet-snap/snap.manifest.json
./node_modules/.yarn-state.yml
key: ${{ needs.prepare-deployment.outputs.CACHE_KEY }}
- name: Run Publish
run: |
npm publish ./packages/starknet-snap --tag "$TAG" --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ needs.prepare-deployment.outputs.TAG }}
TAG: ${{ needs.prepare-deployment.outputs.TAG }}

0 comments on commit 70d5841

Please sign in to comment.