Generate Mystery and Deploy #230
This file contains 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: Generate Mystery and Deploy | |
on: | |
workflow_call: | |
schedule: | |
- cron: "0 1 * * *" | |
push: | |
branches: [ code ] | |
paths: | |
- setup.py | |
- bin/** | |
- config/** | |
- DetectiveMysteryOMatic/** | |
- static/** | |
- scenarios/** | |
- .github/** | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: mystery-o-matic/story | |
path: story | |
token: ${{ secrets.PAT_STORY_TOKEN }} | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsecp256k1-0 graphviz graphviz-dev | |
- name: Install Echidna | |
run: | | |
sudo mv ./bin/echidna /usr/bin | |
echidna --version | |
- name: Install solc using solc-select | |
run: | | |
pip install solc-select | |
solc-select install 0.8.17 | |
solc-select use 0.8.17 | |
- name: Install fonts | |
run: | | |
mkdir -p ~/.local/share/fonts | |
wget -O "Raleway.zip" "https://fonts.google.com/download?family=Raleway" | |
unzip -u "Raleway.zip" -d ~/.local/share/fonts | |
rm -Rf ~/.local/share/fonts/README.txt | |
fc-cache -f | |
- name: Generate Murder Mystery | |
run: | | |
pip3 install . | |
mystery-o-matic scenarios/simple.template.sol static out --today --workers 1 | |
rm -f out/result.json | |
rm -f out/err.out | |
rm -f out/model.sol | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
# Upload the resulting folder | |
path: 'out' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |