Feat/feedstock analysis 99 101 (#117) #1
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 Resource Info to GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: &asset-paths | |
| - "resources/assets/resource_info.csv" | |
| - "resources/assets/resource_info_header_mapping.json" | |
| - "resources/assets/index.html" | |
| - "scripts/validate_headers.py" | |
| - "scripts/csv_to_json.py" | |
| - ".github/workflows/gh-pages.yml" | |
| push: | |
| branches: | |
| - main | |
| paths: *asset-paths | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| name: Validate resource info assets | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Validate header mapping is in sync with CSV | |
| run: python scripts/validate_headers.py | |
| build-and-deploy: | |
| name: Build and deploy to GitHub Pages | |
| needs: validate | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Convert CSV to JSON | |
| run: python scripts/csv_to_json.py | |
| - name: Build site | |
| run: | | |
| mkdir -p _site | |
| cp resources/assets/resource_info.json _site/ | |
| cp resources/assets/resource_info_header_mapping.json _site/ | |
| cp resources/assets/index.html _site/ | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |