Skip to content

Commit

Permalink
New files and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
supermx1 committed Aug 18, 2023
1 parent e9a4754 commit 8d929a3
Show file tree
Hide file tree
Showing 5 changed files with 1,730 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflow/fetch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Get API Data
on:
schedule:
- cron: '0 0 * * *'

jobs:
get_data:
runs-on: ubuntu-latest
steps:

# Step 1: Checkout the repo
- name: Get API Data
uses: actions/checkout@v2

# Step 2: Install Node.js
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

# Step 3: Install dependencies
- name: Install dependencies
run: |
npm install
# Step 4: Run the script
- name: Get API Data
run: |
node index.js
date > last-updated.txt
# Step 5: Push the data
- name: Push Data
run: |
git config --global user.name '${{ github.actor }}'
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
git add -A
git commit -am "Fetch New Data"
git push
Loading

0 comments on commit 8d929a3

Please sign in to comment.