-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (48 loc) · 1.42 KB
/
create-package-index.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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