Skip to content

Commit

Permalink
Add update_guides.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
supernord committed Apr 17, 2024
1 parent 5258f9a commit 13ab61e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 31 deletions.
33 changes: 2 additions & 31 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,12 @@ on:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:

update_guides:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.8.16'

- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute table conversion script
run: python scripts/guides_table_conversion.py

- name: Commit if updated
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || git commit -m "update guides"
- name: Push if changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main

build:
runs-on: ubuntu-latest
steps:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/update_guides.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

name: Update guides

on:
push:
pull_request:
branches: [ main, master ]
workflow_dispatch:

jobs:

update_guides:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.8.16'

- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute table conversion script
run: python scripts/guides_table_conversion.py

- name: Commit if updated
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || git commit -m "update guides"
- name: Push if changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main

0 comments on commit 13ab61e

Please sign in to comment.