Deploy Static Files to Server #3
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 Static Files to Server" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: | |
name: FTP | |
steps: | |
- name: "Checking Out" | |
uses: actions/[email protected] | |
- name: Setting Up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: "21" | |
cache: "yarn" | |
- name: Installing dependencies | |
run: yarn | |
- name: Generating Static Files | |
run: yarn build | |
- name: Deploy to Server | |
uses: joutvhu/ftp-transfer@v1 | |
with: | |
host: ${{ secrets.ftp_server }} | |
port: ${{ secrets.ftp_port }} | |
username: ${{ secrets.ftp_uname }} | |
password: ${{ secrets.ftp_pass }} | |
commands: | | |
pwd | |
ls |