Skip to content

Commit

Permalink
ci pipeline for creating neovim plugin installation artifacts
Browse files Browse the repository at this point in the history
add ci pipeline to main branch
  • Loading branch information
roeybenarieh authored Dec 9, 2023
2 parents 92b2689 + 5246701 commit c3d7f6e
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build_nvim_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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

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

0 comments on commit c3d7f6e

Please sign in to comment.