Update and publish #2601
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: Update and publish | |
on: | |
schedule: | |
- cron: '*/5 * * * *' | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install Python dependencies | |
run: pip3 install -U PyGithub west | |
- name: Setup the manifest data | |
run: | | |
mkdir -p west/submanifests | |
wget --progress=dot https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/main/west.yml -O west/west.yml | |
wget --progress=dot https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/main/submanifests/optional.yaml -O west/submanifests/optional.yaml | |
west init -l west | |
west config manifest.group-filter -- +ci,+optional | |
- name: Update | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mkdir cache | |
python -u update_zephyr_pr.py 2>&1 | |
bzip2 -c cache/data_dump.json > public/data_dump.json.bz2 | |
- name: Crunch | |
run: | | |
python -u crunch_data.py 2>&1 | |
- name: Upload debugging artifacts (debug) | |
if: failure() || github.event_name == 'pull_request' | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: ignore | |
path: | |
public/ | |
- name: Setup pages | |
if: github.event_name != 'pull_request' | |
uses: actions/configure-pages@v3 | |
- name: Upload pages artifact | |
if: github.event_name != 'pull_request' | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: public | |
deploy: | |
if: github.event_name != 'pull_request' | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v2 |