diff --git a/.github/workflows/algolia.yaml b/.github/workflows/algolia.yaml new file mode 100644 index 0000000..835f0e6 --- /dev/null +++ b/.github/workflows/algolia.yaml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6c67dc1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: node_js - -node_js: 6.0.0 - -install: - - npm install gulp-cli -g - - npm install babel-cli -g - - npm install - -before_script: - - git clone https://github.com/cosname/cosx.org.git docs - - cd docs - ##- git checkout gh-pages - -script: - - cd ../ - - echo "ALGOLIA_API_SECRET=${AL_VALUE}" >> .env - - echo "GITHUB_ID=${GITHUB_ID}" >> .env - - echo "GITHUB_SECRET=${GITHUB_SECRET}" >> .env - - curday=`date +%Y-%m-%d` - # - curday='2017-05-01' - - 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 - - cat gulpfile.babel.js - - gulp index - -after_script: