2022-01-03 09:13:35 -08:00
|
|
|
name: Update Content
|
|
|
|
|
|
|
|
on:
|
2023-04-02 16:02:04 -07:00
|
|
|
workflow_dispatch:
|
2022-01-03 09:13:35 -08:00
|
|
|
push:
|
2022-05-18 15:43:07 -07:00
|
|
|
branches:
|
|
|
|
- "*"
|
2023-03-24 20:14:06 -07:00
|
|
|
- "!main"
|
2022-01-03 09:13:35 -08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12
|
|
|
|
|
2023-04-02 16:02:04 -07:00
|
|
|
- name: Install python dependencies
|
2022-01-03 09:13:35 -08:00
|
|
|
run: python -m pip install -r requirements.txt
|
|
|
|
|
|
|
|
- name: Update logos
|
|
|
|
run: npm run gen-logos
|
|
|
|
|
2022-01-31 16:33:13 -08:00
|
|
|
- name: Update content
|
|
|
|
run: npm run gen
|
|
|
|
|
2023-04-02 16:02:04 -07:00
|
|
|
- name: Install node dependencies
|
|
|
|
run: npm ci
|
|
|
|
|
|
|
|
- name: Test updated files
|
|
|
|
run: npm test
|
|
|
|
|
2022-01-03 09:13:35 -08:00
|
|
|
- name: Check for modified files
|
|
|
|
id: git-check
|
|
|
|
run: echo ::set-output name=modified::$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)
|
|
|
|
|
|
|
|
- name: Update changes in GitHub repository
|
|
|
|
if: steps.git-check.outputs.modified == 'true'
|
2022-05-18 15:43:07 -07:00
|
|
|
run: |
|
2022-01-03 09:13:35 -08:00
|
|
|
git config --global user.name 'WormholeBot'
|
|
|
|
git config --global user.email 'wormhole@wormholenetwork.com'
|
|
|
|
git add -A
|
|
|
|
git commit -m '[automated] update content'
|
2022-01-31 16:33:13 -08:00
|
|
|
git push
|