Skip to content

Commit

Permalink
Delete .github/workflows/deploy_all_manual.yaml (#100)
Browse files Browse the repository at this point in the history
* Delete .github/workflows/deploy_all_manual.yaml

* Update deploy_test.yaml

* Update deploy_master.yaml

* Update deploy_master.yaml

* Update deploy_master.yaml

* Update deploy_test.yaml
  • Loading branch information
han16nah authored Jul 4, 2024
1 parent a73b186 commit cbb33cb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 46 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/deploy_all_manual.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/deploy_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches: ["master"]

workflow_dispatch:
inputs:
REUPLOAD_ALL:
description: 'Re-upload all files'
type: boolean
default: false

concurrency:
group: "ftp"
Expand Down Expand Up @@ -37,3 +42,7 @@ jobs:
run: bash build_prod.sh
- name: Upload to FTP
run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -Rn --ignore-time -P 12 upload/ /web/website ; quit"
if: ${{ github.event.inputs.REUPLOAD_ALL == 'false'}}
- name: Upload to FTP (all files)
run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -R -P 12 upload/ /web/website ; quit"
if: ${{ github.event.inputs.REUPLOAD_ALL == 'true'}}
19 changes: 9 additions & 10 deletions .github/workflows/deploy_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ on:

workflow_dispatch:
inputs:
BRANCH:
description: 'Branch to use'
required: true
default: 'test'
type: choice
options:
- master
- test
REUPLOAD_ALL:
description: 'Re-upload all files'
type: boolean
default: false

concurrency:
group: "ftp"
Expand All @@ -30,7 +26,6 @@ jobs:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.96.0
BRANCH: ${{ inputs.BRANCH }}
steps:
- name: Install Hugo CLI
run: |
Expand All @@ -44,5 +39,9 @@ jobs:
run: "npm ci"
- name: Build with Hugo and Juice
run: bash build_test.sh
- name: Upload to FTP
- name: Upload to FTP (only changed files)
run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -Rn --ignore-time -P 12 upload/ /web/website_tmp ; quit"
if: ${{ github.event.inputs.REUPLOAD_ALL == 'false'}}
- name: Upload to FTP (all files)
run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -R -P 12 upload/ /web/website_tmp ; quit"
if: ${{ github.event.inputs.REUPLOAD_ALL == 'true'}}

0 comments on commit cbb33cb

Please sign in to comment.