Skip to content

Add github actions

Add github actions #1

Workflow file for this run

name: Update README
on:
push:
branches:
- main
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update README
run: |
REPO_URL="https://github.com/${{ github.repository }}"
ENCODED_REPO_URL=$(echo $REPO_URL | jq -Rr @uri)
VERCEL_BUTTON="[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=${ENCODED_REPO_URL})"
sed -i "s|<!-- VERCEL_DEPLOY_BUTTON -->|${VERCEL_BUTTON}|g" README.md
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "Update README with Vercel deploy button" || echo "No changes to commit"
git push