GET Mailchimp #1613
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: GET Mailchimp | |
on: | |
schedule: | |
# At 3am every night | |
- cron: '0 3 * * *' | |
jobs: | |
get-data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
- run: npm install | |
- name: Fetch Mailchimp data | |
env: | |
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }} | |
run: npm run get-mailchimp | |
- name: check for changes | |
run: git status | |
- name: stage changed files | |
run: | | |
git config --local user.name "ocf-bot" | |
git config --local user.email "[email protected]" | |
git add . | |
git commit -m "🗃 Add latest mailchimp data" | |
- name: fetch from main | |
run: git fetch origin main | |
- name: push code to main | |
run: git push origin HEAD:main |