Skip to content

Commit

Permalink
fix cosname/cosx.org#1085: replace Travis with GHA to rebuild Algolia…
Browse files Browse the repository at this point in the history
… search index
  • Loading branch information
yihui committed Aug 12, 2023
1 parent e2ec14e commit b81c4f8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 29 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/algolia.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Rebuild Algolia Index

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 6.0.0

- name: Install global packages
run: |
npm install gulp-cli -g
npm install babel-cli -g
- name: Install dependencies
run: npm install

- name: Clone repository
run: git clone https://github.com/cosname/cosx.org.git docs

- name: Prepare environment
run: |
echo "ALGOLIA_API_SECRET=${{ secrets.AL_VALUE }}" >> .env
curday=$(date +%Y-%m-%d)
echo "var curday='${curday}'" >> gulpfile.babel.js2
cat gulpfile.babel.js >> gulpfile.babel.js2
rm gulpfile.babel.js
mv gulpfile.babel.js2 gulpfile.babel.js
- name: Build and test
run: |
gulp index
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

0 comments on commit b81c4f8

Please sign in to comment.