Fetch and Create READMEs #3
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: Fetch and Create READMEs | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Fetch and Create READMEs | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm install -g pnpm | |
pnpm install --frozen-lockfile | |
- name: Create READMEs | |
run: node scripts/write_readme.mjs | |
env: | |
BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }} | |
- name: Commit generated files | |
env: | |
PAT_TOKEN: ${{ secrets.PAT_TOKEN }} | |
run: | | |
git config --global user.name "Martin DONADIEU" | |
git config --global user.email "martindonadieu@gmail.com" | |
git add -A | |
git commit -m "Commit generated files" | |
git push origin main -f | |
working-directory: ./ |