Modify #120
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: DEPLOY | |
on: | |
push: | |
branches: | |
- development | |
jobs: | |
deploy: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7.6' | |
- name: Cache primes | |
id: cache-primes | |
uses: actions/cache@v3 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} | |
- name: Set bundle path | |
run: bundle config path vendor/bundle | |
# - name: Install gsl | |
# run: chmod +x ./scripts/install_gsl.sh && ./scripts/install_gsl.sh | |
- name: Install bundle | |
# if: steps.cache-primes.outputs.cache-hit != 'true' | |
run: bundle check --path vendor/bundle || bundle install --clean --deployment && bundle package --all | |
- name: Execute Rake task (build, commit and push master branch) | |
env: | |
GH_TOKEN: ${{ secrets.GithubPersonalToken }} | |
run: | | |
git config --global user.name "aloerina01" | |
git config --global user.email "4443321+aloerina01@users.noreply.github.com" | |
bundle exec rake deploy --trace | |
indexing: | |
name: Indexing into Algolia | |
needs: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7.6' | |
- name: Cache primes | |
id: cache-primes | |
uses: actions/cache@v3 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} | |
- name: Bundle install | |
# if: steps.cache-primes.outputs.cache-hit != 'true' | |
run: bundle check --path vendor/bundle || bundle install --clean --deployment && bundle package --all | |
- name: Indexing | |
env: | |
ALGOLIA_ADMIN_API_KEY: ${{ secrets.AlgoliaAdminAPIKey }} | |
run: $GITHUB_WORKSPACE/scripts/indexing.sh $ALGOLIA_ADMIN_API_KEY ${{ secrets.GITHUB_TOKEN }} | |