Skip to content

📜 Content Cleanup upto level 8 #10107

📜 Content Cleanup upto level 8

📜 Content Cleanup upto level 8 #10107

# Script to regenerate the TypeScript on the main branch, if it ever happens
# that the JS bundle we find there is out of sync.
name: Automatically update JavaScript bundle
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
update_javascript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout branch (with token)
if: github.event_name == 'push'
with:
fetch-depth: 1
# We need to pass the token here -- the commit action below will not overwrite the token to push.
token: ${{ secrets.FELIENNE_GITHUB_ACCESS_TOKEN }}
- uses: actions/checkout@v4
name: Checkout branch (on pull requests)
if: github.event_name != 'push'
with:
fetch-depth: 1
- name: Install Nodejs dependencies
run: |
npm ci
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: 3.12
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Generating TypeScript
run: |
doit run typescript
- name: Commit changed files
uses: stefanzweifel/[email protected]
if: github.event_name == 'push'
with:
commit_message: Automatically update JavaScript bundle 🤖 beep boop
branch: ${{ github.ref_name }}
env:
# This is necessary to bypass branch protection (which will disallow non-reviewed pushes otherwise)
GITHUB_TOKEN: ${{ secrets.FELIENNE_GITHUB_ACCESS_TOKEN }}