Skip to content

Updating FTP credentials for deployment on my new server #80

Updating FTP credentials for deployment on my new server

Updating FTP credentials for deployment on my new server #80

Workflow file for this run

name: Deploy to FTP
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set environment variables
env:
ENVIRONMENT: production
MYSQL_DATABASE_NAME: ${{ secrets.MYSQL_DATABASE_NAME }}
MYSQL_USERNAME: ${{ secrets.MYSQL_USERNAME }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_HOST: ${{ secrets.MYSQL_HOST }}
MYSQL_PORT: ${{ secrets.MYSQL_PORT }}
EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
EMAIL_USERNAME: ${{ secrets.EMAIL_USERNAME }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
run: |
echo "ENVIRONMENT=production" >> .env
echo "MYSQL_DATABASE_NAME=${MYSQL_DATABASE_NAME}" >> .env
echo "MYSQL_USERNAME=${MYSQL_USERNAME}" >> .env
echo "MYSQL_PASSWORD=${MYSQL_PASSWORD}" >> .env
echo "MYSQL_HOST=${MYSQL_HOST}" >> .env
echo "MYSQL_PORT=${MYSQL_PORT}" >> .env
echo "EMAIL_HOST=${EMAIL_HOST}" >> .env
echo "EMAIL_USERNAME=${EMAIL_USERNAME}" >> .env
echo "EMAIL_PASSWORD=${EMAIL_PASSWORD}" >> .env
- name: FTP deployment
uses: SamKirkland/FTP-Deploy-Action@4.1.0
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
server-dir: ${{ secrets.FTP_DIR }}
local-dir: "./"