Update README.md #13
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: Create json index and deploy to github.io | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
reindex-json-file: | |
runs-on: ubuntu-latest | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository and github.io | |
contents: write | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- uses: leafo/gh-actions-lua@v10 | |
- uses: leafo/gh-actions-luarocks@v4 | |
- name: Install libzzip-dev | |
run: sudo apt-get install -y libzzip-dev | |
- name: Install luarocks modules | |
run: | | |
luarocks install json-lua | |
luarocks install luazip | |
luarocks install inspect | |
- name: Run indexing | |
run: | | |
lua reindex.lua | |
# Commit all changed files back to the repository | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Automated package index update. | |
file_pattern: '*.packages.json' | |
# push to githib.io | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: '.' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |