Skip to content

記事追加

記事追加 #42

name: Register algolia
on:
push:
branches: [main]
paths: ['posts/**']
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v2
- name: Create .env
run: |
touch .env.local
echo NEXT_PUBLIC_ALGOLIA_APP_ID=${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID}} >> .env.local
echo ALGOLIA_ADMIN_KEY=${{ secrets.ALGOLIA_ADMIN_KEY}} >> .env.local
- name: yarn install
run: yarn install
- name: Run algolia script
run: yarn run algolia
- name: Commit and push
run: |
git config --local user.name 'ryo_of_the_ryo'
git config --local user.email '[email protected]'
git add .
git commit --allow-empty -m "Run algolia"
git push