mirror of
https://github.com/Dictionarry-Hub/database.git
synced 2025-12-11 16:26:58 +00:00
feat(workflow): update bundle workflow to trigger website build for ghtub pages on database update
This commit is contained in:
16
.github/workflows/bundle.yml
vendored
16
.github/workflows/bundle.yml
vendored
@@ -3,25 +3,20 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- stable
|
- stable
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bundle:
|
bundle:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install pyyaml
|
python -m pip install pyyaml
|
||||||
|
|
||||||
- name: Run bundling script
|
- name: Run bundling script
|
||||||
run: python scripts/bundle.py
|
run: python scripts/bundle.py
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "action@github.com"
|
git config --local user.email "action@github.com"
|
||||||
@@ -29,8 +24,9 @@ jobs:
|
|||||||
git add bundles/
|
git add bundles/
|
||||||
git commit -m "Update bundles" || echo "No changes to commit"
|
git commit -m "Update bundles" || echo "No changes to commit"
|
||||||
git push
|
git push
|
||||||
|
- name: Trigger Website Build
|
||||||
- name: Trigger Vercel Deploy
|
uses: peter-evans/repository-dispatch@v3
|
||||||
if: success()
|
with:
|
||||||
run: |
|
token: ${{ secrets.WORKFLOW_AUTOMATION_TOKEN }}
|
||||||
curl -X POST "${{ secrets.VERCEL_DEPLOY_HOOK_URL }}"
|
repository: Dictionarry-Hub/website
|
||||||
|
event-type: database-updated
|
||||||
|
|||||||
Reference in New Issue
Block a user