Update Version History #1294
This file contains hidden or 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 Version History | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 3 * * *" # 3AM UTC (8PM PST) | |
jobs: | |
update-history: | |
name: Update Version History | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://rn-versions.github.io/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache .yarn/cache | |
uses: actions/cache@v3 | |
env: | |
cache-name: yarn-cache | |
with: | |
path: .yarn/cache | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }} | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn --immutable | |
env: | |
HUSKY: 0 | |
- name: Update Version History | |
run: yarn update-history | |
continue-on-error: true | |
- name: Configure Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "History Update Workflow" | |
- name: Commit and push | |
run: | | |
git add --all | |
git commit -m "Update Version History" | |
git push | |
- name: Run build | |
run: yarn build | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: build |