記事追加 #42
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: 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 |