[Deploy merge instead delete old files] can i deploy use merge instead removing all old files ? #1070
Replies: 6 comments 9 replies
-
Might be worth checking out the |
Beta Was this translation helpful? Give feedback.
-
actually this is for cache strategy, so process won't be repeated for files that are not changed (like articles for example). so the process only runs for files that have been managed or new files (new article). and the old files are left alone because they don't need to be forced (save time) |
Beta Was this translation helpful? Give feedback.
-
look. index.html got removed, iam not modifying index.html at all. leaving only |
Beta Was this translation helpful? Give feedback.
-
This work, but only for local process. not working when i run this on 'github action'. https://github.com/dimaslanjaka/dimaslanjaka.github.io/blob/compiler/src/gulp/tasks/deploy.ts |
Beta Was this translation helpful? Give feedback.
-
I've confirmed, JamesIves/[email protected] still deletes old files and pushes them right away |
Beta Was this translation helpful? Give feedback.
-
SOLUTION: cache the public directory to keep old processed files - name: Get Caches
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
uses: actions/cache@v2
with:
path: |
${{ steps.npm-cache-dir.outputs.dir }}
${{ steps.yarn-cache-dir-path.outputs.dir }}
./node_modules
~/.npm
./tmp
./build
./packages
./databases
./docs
key: ${{ runner.os }}-xnodex-${{ hashFiles('**/.guid') }}
restore-keys: ${{ runner.os }}-xnodex-
- name: Deploy 🚀
#if: ${{ false }}
#if: steps.hexo-validate.outcome == 'success' && steps.hexo-validate.conclusion == 'success'
uses: JamesIves/[email protected]
with:
branch: master # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
force: false # merge instead push --force, (keep old / non modified) files? |
Beta Was this translation helpful? Give feedback.
-
i have a lot nodejs process, and they have separated runner.
i want deploy to my github pages with
pull
first insteadpush --force
directly. so, my other old files not be deleted after deployedmy sample 1 workflow
Beta Was this translation helpful? Give feedback.
All reactions