在Github页面中将工件用作Jekyll资产
我使用Gitlab页面和Jekyll生成网站,使用python脚本生成Jekyll使用的图像和数据文件(JSON)。由于我需要每天更新这些文件,我提交并推送了几十张图片来更新网站,这真的不方便 我还使用Github操作在Github上生成并存储这些文件作为工件:在Github页面中将工件用作Jekyll资产,jekyll,github-pages,github-actions,Jekyll,Github Pages,Github Actions,我使用Gitlab页面和Jekyll生成网站,使用python脚本生成Jekyll使用的图像和数据文件(JSON)。由于我需要每天更新这些文件,我提交并推送了几十张图片来更新网站,这真的不方便 我还使用Github操作在Github上生成并存储这些文件作为工件: - name: Main script run: | python generate_images.py --reload # saves in folder saved_images # I manually c
- name: Main script
run: |
python generate_images.py --reload # saves in folder saved_images
# I manually commit and push these images in jekyll/assets/img to update the site
- name: Upload images artifacts
uses: actions/upload-artifact@v1
with:
name: saved_images
path: saved_images
我会发现最好告诉Jekyll使用工件,而不是提交的文件,这样我就可以通过重新启动github操作来更新站点(希望没有额外的提交或分支更改)。事实上,这就是我在Gitlab上看到的另一个项目:
pages:
stage: Web_page
before_script:
- python generate_images.py --reload
- cp -r saved_images/*.png jekyll/assets/img
- cd jekyll
- bundle install --path vendor
script:
- bundle exec jekyll build -d ../public
...
所以我想知道是否可以在Github页面中将工件用作Jekyll资产和数据文件