Updating FTP credentials for deployment on my new server #79
This file contains 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: 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 }} | |
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 | |
- name: FTP deployment | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
server-dir: ${{ secrets.FTP_DIR }} | |
local-dir: "./" |