fixed check entrypoint #37
Workflow file for this run
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
name: production-deploy | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: execute tests | |
run: echo Test ecexution ⚙️ | |
deploy-production: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v2 | |
with: | |
registry-type: public | |
- name: build and deploy | |
env: | |
ENV: production | |
SWARM_HOST: 156.54.237.240 | |
REGISTRY: public.ecr.aws/k2u7h0h2 | |
AWS_REGION: eu-central-1 | |
SWARM_PEM: ${{secrets.AI_PRODUCTION_PEM}} | |
SHAREPOINT_ID: ${{secrets.SHAREPOINT_ID}} | |
run: | | |
eval `ssh-agent -s` | |
ssh-add - <<< "${SWARM_PEM}" | |
mkdir ~/.ssh | |
echo "ssh directory created" | |
ssh-keyscan -p 2222 -H $SWARM_HOST >> ~/.ssh/known_hosts | |
echo "ssh key added" | |
echo "running deploy.sh $ENV" | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
echo "Free space:" | |
df -h | |
sh deploy.sh $ENV |