actions: Switch to using github-pages-directory-listing

https://github.com/jayanta525/github-pages-directory-listing

Also, fetch-depth=1, this never worked for the time thing anyway so 
let's avoid cloning like 5GB every commit
This commit is contained in:
lifehackerhansol 2023-04-02 11:20:31 -07:00 committed by GitHub
parent 52ea16bf90
commit aba82df4f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,18 +14,20 @@ jobs:
with: with:
persist-credentials: false persist-credentials: false
submodules: recursive submodules: recursive
fetch-depth: 0 fetch-depth: 1
- name: Install apindex-v2 # to get README.md to webpage as well as GitHub's UI
run: | - name: Pre-generation of directory listing
sudo apt-get update run: cp README.md files/README.md
sudo apt-get install curl git -y
curl https://raw.githubusercontent.com/jayanta525/apindex/master/install.sh | sudo bash
- name: Build site - name: Github Pages Directory Listing
uses: jayanta525/github-pages-directory-listing@v3
with:
FOLDER: files
# these shouldn't be in apindex, but need to be in repo root for GitHub Pages
- name: Pre-generation of directory listing
run: | run: |
cp README.md files/README.md
apindex files
mkdir public mkdir public
cp -r files/* public cp -r files/* public
cp CNAME public cp CNAME public