mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-14 08:58:25 +00:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Raw API
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "domains/*"
|
|
- ".github/workflows/raw-api.yml"
|
|
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}-raw-api
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
update:
|
|
name: Update
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: is-a-dev/raw-api
|
|
path: raw-api
|
|
token: ${{ secrets.BOT }}
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20.x
|
|
|
|
- name: Update Data
|
|
run: node raw-api/scripts/update.js
|
|
|
|
- name: Commit
|
|
uses: cpina/github-action-push-to-another-repository@main
|
|
with:
|
|
source-directory: "raw-api"
|
|
destination-github-username: is-a-dev
|
|
destination-repository-name: raw-api
|
|
user-email: "actions@github.com"
|
|
user-name: "GitHub Actions"
|
|
env:
|
|
API_TOKEN_GITHUB: ${{ secrets.BOT }}
|