Skip to content

Working on CI - WIP #34

Working on CI - WIP

Working on CI - WIP #34

name: "tools/essence-feature-stats"
on:
push
env:
ESSENCE_DIR: "./EssenceCatalog"
CONJURE_DIR: "./conjure"
ESSENCE_EXAMPLES_REPO: "https://github.com/conjure-cp/EssenceCatalog.git"
CONJURE_REPO: "https://github.com/conjure-cp/conjure"
OUTPUT_PATH: "./web/static/index.html"
KEYWORD_BLOCKLIST: "mInfo,finds,givens,enumGivens,enumLettings,lettings,
unnameds,strategyQ,Auto,Interactive,strategyA,trailCompact,
nameGenState,nbExtraGivens,representations,representationsTree,
originalDomains,trailGeneralised,trailVerbose,trailRewrites,
mLanguage,language,version,mStatements,Name,Declaration"
jobs:
build:
name: "tools/essence-feature-stats: Build the tool and clone EssenceCatalog repo"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: pip install -r requirements.txt
working-directory: ./tools/essence-feature-usage-stats
- name: Run main.py to generate the table
run: python main.py
working-directory: ./tools/essence-feature-usage-stats
- name: Fix file permissions
run: chmod -v -R +rwx ./web/static
working-directory: ./tools/essence-feature-usage-stats
- name: Compress the GitHub Page directory into a tar archive
run: tar -czvf ~/archive.tar.gz ./web/static/*
working-directory: ./tools/essence-feature-usage-stats
- name: Configure GitHub Pages
uses: actions/configure-pages@v3
- name: Upload Tar Archive as a GitHub Pages artifact
uses: actions/upload-pages-artifact@v2
with:
name: github-pages
path: ~/archive.tar.gz
deploy:
name: "tools/essence-feature-stats: Deploy the generated page"
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
artifact_name: github-pages