Skip to content

static-files-generation #772

static-files-generation

static-files-generation #772

Workflow file for this run

name: static-files-generation
on:
schedule:
- cron: '0 2 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
generate:
runs-on: ubuntu-latest
outputs:
needs_deploy: ${{ steps.commit.outcome == 'success' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install APT Packages
run: sudo apt install exuberant-ctags make
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'poetry'
- name: Generate files from the latest kernel
run: |
poetry install
poetry run python3 gen_syscalls.py FETCH
- name: Commit
id: commit
continue-on-error: true
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
bash deploy.sh
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: generate
if: ${{ needs.generate.outputs.needs_deploy == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4