Skip to content

docs(readme): production reminder, web app restrictions #13

docs(readme): production reminder, web app restrictions

docs(readme): production reminder, web app restrictions #13

Workflow file for this run

name: CI/CD Production Deployment
on:
pull_request:
branches: [ main ]
types: [ closed ]
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
steps:
- name: "Add GitHub to the SSH known hosts file"
run: |
mkdir -p -m 0700 /home/runner/.ssh
echo "${{ secrets.SSH_PRODUCTION_HOST }}" >> /home/runner/.ssh/known_hosts
chmod 600 /home/runner/.ssh/known_hosts
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup SSH Agent
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.SSH_PRODUCTION_PRIVATE_KEY }}
- name: Deploy to production server
run: ssh -o UserKnownHostsFile=/home/runner/.ssh/known_hosts ${{ secrets.SSH_PRODUCTION_SERVER }} 'bash ${{ secrets.SSH_PRODUCTION_PATH }}/scripts/deploy.sh prod ${{ secrets.SSH_PRODUCTION_PATH }}'