log to console #9
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 Static Paths | |
on: | |
push: | |
branches: | |
- remote-metas-experiment # Change this to your target branch | |
jobs: | |
update-static-paths: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: npm install @octokit/rest | |
- name: Install GitHub CLI | |
run: sudo apt-get install -y gh | |
- name: Authenticate GitHub CLI | |
run: gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}" | |
- name: Generate static paths | |
run: node ./update-static-paths.mjs | |
- name: Commit and push changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add static-paths.json | |
git commit -m 'Update static paths' | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |