Skip to content

Commit

Permalink
feat: updat testnet auto deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Th0rgal committed Dec 2, 2024
1 parent ad295c2 commit a1954b4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/testnet_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
env:
SSH_HOST: sepolia.api.starknet.quest
SSH_USER: ubuntu
REPO_PATH: '~/api.starknet.quest'
AWS_PATH: 'lfg-labs/api.starknet.quest/sepolia'
REPO_PATH: "~/api.starknet.quest"
AWS_PATH: "lfg-labs/api.starknet.quest/sepolia"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'eu-west-3'
AWS_DEFAULT_REGION: "eu-west-3"
steps:
- name: Setting up SSH key
uses: webfactory/[email protected]
Expand All @@ -33,10 +33,13 @@ jobs:
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
aws configure set default.region $AWS_DEFAULT_REGION
cd api.starknet.id/
sudo docker compose down quest_server
cd ../
if [ -d "\$REPO_PATH/.git" ]; then
echo "Repository exists, pulling changes..."
cd \$REPO_PATH
sudo docker-compose down
git reset --hard HEAD
git pull
else
Expand All @@ -51,5 +54,7 @@ jobs:
sudo chmod -R 755 \$REPO_PATH
aws s3 cp s3://$AWS_PATH/ \$REPO_PATH --recursive
sudo docker-compose up --build -d
cd ../api.starknet.id/
sudo docker-compose up --build -d quest_server
EOF

0 comments on commit a1954b4

Please sign in to comment.