File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 2626 - name : Test SSH Connection
2727 run : |
2828 ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} "echo SSH Connection Successful"
29-
30- - name : Create .env File
31- uses : ' DamianReeves/write-file-action@master'
32- with :
33- path : ~/website-cms/.env
34- write-mode : overwrite
35- contents : ${{ secrets.ENV_FILE_CONTENT }}
36-
29+
3730 - name : Deploy to EC2
3831 run : |
3932 ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} << 'EOF'
4538 sudo chmod -R u+rwX ~/website-cms
4639 git config --global --add safe.directory "$(pwd)"
4740 git pull origin main
48-
41+ cat << 'EOT' > .env
42+ ${{ secrets.ENV_FILE_CONTENT }}
43+ EOT
4944 docker compose up -d --build
5045 EOF
You can’t perform that action at this time.
0 commit comments