diff --git a/pdf/.github/workflows/workflow.yml b/pdf/.github/workflows/workflow.yml index 6f4c5f0..9c28440 100644 --- a/pdf/.github/workflows/workflow.yml +++ b/pdf/.github/workflows/workflow.yml @@ -1,51 +1,40 @@ -name: Generate Directory Listing and Deploy to GitHub Pages - +name: directory-listing on: [push] jobs: - build: + pages-directory-listing: runs-on: ubuntu-latest - + name: Directory Listings Index steps: - - uses: actions/checkout@v2 + - name: Checkout Repository + uses: actions/checkout@v3 + with: + ref: master #checkout different branch - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 + - name: Generate Directory Listings + uses: jayanta525/github-pages-directory-listing@v4.0.0 + with: + FOLDER: data #directory to generate index - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install beautifulsoup4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: 'data' # upload generated folder - - name: Generate Directory Listing - run: | - import os - import pathlib - from bs4 import BeautifulSoup + deploy: + needs: pages-directory-listing + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source - def create_index_html(path): - soup = BeautifulSoup("