Update schedule #4481
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 schedule | |
on: | |
schedule: | |
- cron: '0 */6 * * *' | |
workflow_dispatch: | |
jobs: | |
update_schedule: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: Install all dependencies | |
run: yarn install --frozen-lockfile | |
- name: Update schedule | |
run: yarn updateSchedule | |
- name: Set cridentials | |
run: | | |
git config --global user.name 'Automated Updater' | |
git config --global user.email '[email protected]' | |
- name: Commit schedule | |
run: yarn commitSchedule | |
- name: Push changes | |
run: | | |
git pull --rebase | |
git push | |
# TODO find a way to reuse workflow from deploy.yml | |
deploy: | |
needs: update_schedule | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: Install all dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Deploy to gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
publish_dir: ./build |