mirror of
https://github.com/jayanta525/github-pages-directory-listing.git
synced 2025-06-18 14:15:33 -04:00
github actions template
- add Dockerfile - add entrypoint - add Github workflow
This commit is contained in:
parent
33dd650635
commit
9fcb6f8577
23
.github/workflows/main.yml
vendored
Normal file
23
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
pages-directory-listing:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test Actions Template
|
||||
steps:
|
||||
# To use this repository's private action,
|
||||
# you must check out the repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Generate Directory Listings
|
||||
uses: ./ # Uses an action in the root directory
|
||||
with:
|
||||
FOLDER: tests
|
||||
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@4.1.3
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: tests
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
# Container image that runs your code
|
||||
ARG VARIANT="3.10-bullseye"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
|
||||
|
||||
# Copies your code file from your action repository to the filesystem path `/` of the container
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Code file to execute when the docker container starts up (`entrypoint.sh`)
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
12
action.yml
Normal file
12
action.yml
Normal file
@ -0,0 +1,12 @@
|
||||
# action.yml
|
||||
name: 'Github Pages Directory Listing'
|
||||
description: 'Generate Directory Listing index for Github Pages'
|
||||
inputs:
|
||||
FOLDER:
|
||||
description: 'folder to start index generations'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
args:
|
||||
- ${{ inputs.FOLDER }}
|
11
entrypoint.sh
Executable file
11
entrypoint.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install cmake python3 -y
|
||||
git clone --depth 1 https://github.com/jayanta525/apindex-v2.git
|
||||
cd apindex-v2
|
||||
cmake . -DCMAKE_INSTALL_PREFIX=/usr
|
||||
sudo make install
|
||||
cd ..
|
||||
rm -rf apindex-v2/
|
||||
apindex $1/.
|
0
tests/abc.txt
Normal file
0
tests/abc.txt
Normal file
0
tests/abc/abcdef.txt
Normal file
0
tests/abc/abcdef.txt
Normal file
0
tests/def.txt
Normal file
0
tests/def.txt
Normal file
Loading…
Reference in New Issue
Block a user