From 2586d095810a9c91cc8c408cf88ddc37cdbe424c Mon Sep 17 00:00:00 2001 From: David Sedlar Date: Tue, 16 Jul 2024 17:02:32 +0200 Subject: [PATCH] Create deploy_main_to_ftp.yml (#45) --- .github/workflows/deploy_main_to_ftp.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/deploy_main_to_ftp.yml diff --git a/.github/workflows/deploy_main_to_ftp.yml b/.github/workflows/deploy_main_to_ftp.yml new file mode 100644 index 0000000..82f6cdd --- /dev/null +++ b/.github/workflows/deploy_main_to_ftp.yml @@ -0,0 +1,24 @@ +on: + push: + branches: + - main + workflow_dispatch: +name: Deploy website on main push +jobs: + web-deploy: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: Get latest code + uses: actions/checkout@v3 + - run: yarn install && yarn build + + - name: Sync files + uses: wangyucode/sftp-upload-action@v2.0.2 + with: + host: ${{ secrets.FTP }} + username: ${{ secrets.FTP_USERNAME }} + password: ${{ secrets.FTP_PASSWORD }} + localDir: './dist/' + remoteDir: './www/' + exclude: '.git*,**/.git*,**/.git*/**,**/.idea*,**/.idea*/**.DS_Store'