roeybenarieh make artifact of nvim generated folders #17
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: 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/runner/.config/nvim | |
LOCAL_DATA_PATH: /home/runner/.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.tar.gz -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.tar.gz | |
retention-days: 90 | |