Skip to content

roeybenarieh make artifact of nvim generated folders #13

roeybenarieh make artifact of nvim generated folders

roeybenarieh make artifact of nvim generated folders #13

name: artifact nvim generated folders
run-name: ${{ github.actor}} make artifact of nvim generated folders
on:
workflow_dispatch:
push:
branches:
- main
- feat/cicd
env:
HOME_PATH: /home/runner
jobs:
artifact-neovim-generated-folders:
runs-on: ubuntu-latest
env:
CONF_PATH: $HOME_PATH/.config/nvim
LOCAL_DATA_PATH: $HOME_PATH/.local/share/nvim
BUILD_FILE_NAME: build.tar.gz
steps:
# this checkout moves repo to the $GITHUB_WORKSPACE directory
- name: checkout repo code to container
uses: actions/checkout@v4
- name: move nvim configuration from repo
run: mkdir -p $CONF_PATH; mv $GITHUB_WORKSPACE/* $CONF_PATH
- name: install neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
- name: install nvim plugins
# open nvim without UI, call ":Lazy install" and quit
run: nvim --headless -c "Lazy install" -c "qall"
- name: compress nvim generated folders
run: tar -czf $BUILD_FILE_NAME -C $HOME_PATH $CONF_PATH $LOCAL_DATA_PATH
- name: artifact nvim generated folders
uses: actions/upload-artifact@v3
with:
name: generated nvim folders
path: $BUILD_FILE_NAME
retention-days: 90