We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5a499b commit 3d7ca1cCopy full SHA for 3d7ca1c
.github/workflows/main.yml
@@ -27,6 +27,13 @@ jobs:
27
run: |
28
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
+
37
- name: Deploy to EC2
38
39
ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} << 'EOF'
@@ -38,8 +45,6 @@ jobs:
45
sudo chmod -R u+rwX ~/website-cms
46
git config --global --add safe.directory "$(pwd)"
40
47
git pull origin main
41
- cat > .env <<EOT
42
- ${{ secrets.ENV_FILE_CONTENT }}
43
- EOT
48
44
49
docker compose up -d --build
50
EOF
0 commit comments