Update Perl Weekly #213
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: Update Perl Weekly | |
on: | |
schedule: | |
- cron: "0 9 * * 1" | |
jobs: | |
perl-weekly: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: main | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- name: npm install | |
run: npm install --only=prod | |
working-directory: . | |
- name: Get fresh Perl Weekly | |
run: node ./feeds/perl-weekly/index.js | |
# you need git commit to push the forks data to the repo | |
- name: Git commit | |
run: | | |
# git commit if there's any change | |
if test -n "$(git status --porcelain 2>/dev/null)"; then | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add . | |
git commit -m "Update Perl Weekly data" | |
git push origin main | |
fi |