-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
@@ -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 | ||
|
@@ -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 |