Deploy JSON Directory to Pages #452
This file contains hidden or 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: Deploy JSON Directory to Pages | |
| on: | |
| # Run when the gh-pages branch is updated | |
| push: | |
| branches: | |
| - gh-pages | |
| # Allow manual triggering | |
| workflow_dispatch: | |
| # Run after the main workflow completes | |
| workflow_run: | |
| workflows: ["Run ElizaOS Daily Task"] | |
| branches: [main] | |
| types: | |
| - completed | |
| jobs: | |
| pages-directory-listing: | |
| runs-on: ubuntu-latest | |
| name: Generate Directory Listing and Deploy | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout gh-pages branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: gh-pages | |
| - name: Generate Directory Listings for JSON folder | |
| uses: jayanta525/github-pages-directory-listing@v4.0.0 | |
| with: | |
| FOLDER: . # directory to generate index | |
| # Setup and deploy to GitHub Pages | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '.' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |