Fetch new plugins and Themes #1151
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: Fetch new plugins and Themes | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
workflow_dispatch: | |
jobs: | |
fetch-plugins: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4.3.0 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ${GITHUB_WORKSPACE}/bin/requirements.txt | |
- name: Fetch plugins | |
run: | | |
python ${GITHUB_WORKSPACE}/bin/fetch_packages.py plugins | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USER: ${{ github.actor }} | |
- name: Commit files | |
run: | | |
echo ${{ github.ref }} | |
git pull | |
git add . | |
git config --local user.email "github-actions@github.com" | |
git config --local user.name "github-actions" | |
git commit -m "AUTOMATED: fetch new vuepress themes and plugins" -a | exit 0 | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: ${{ github.ref }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
fetch-themes: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4.3.0 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ${GITHUB_WORKSPACE}/bin/requirements.txt | |
- name: Fetch themes | |
run: | | |
python ${GITHUB_WORKSPACE}/bin/fetch_packages.py themes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USER: ${{ github.actor }} | |
- name: Commit files | |
run: | | |
echo ${{ github.ref }} | |
git pull | |
git add . | |
git config --local user.email "github-actions@github.com" | |
git config --local user.name "github-actions" | |
git commit -m "AUTOMATED: fetch new vuepress themes and themes" -a | exit 0 | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: ${{ github.ref }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} |