Deploy Readme #44
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: Deploy Readme | |
on: | |
workflow_run: | |
workflows: ["Deploy"] | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
HYGRAPH_URL: ${{ vars.HYGRAPH_URL }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.18.1' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn | |
- name: Generate readme | |
run: yarn workspace @teimurjan/profile-readme generate-readme | |
- name: Clone teimurjan repo | |
run: | | |
git clone https://x-access-token:${{ secrets.TEIMURJAN_REPO_TOKEN }}@github.com/teimurjan/teimurjan.git | |
- name: Copy readme to teimurjan | |
run: | | |
cp workspaces/profile-readme/README.md teimurjan/README.md | |
- name: Commit and push changes to teimurjan | |
working-directory: teimurjan | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add README.md | |
git commit -m "Update README.md content from teimurjan.github.io" || echo "No changes to commit" | |
git push origin HEAD:main |