Unified · Split
| @@ -0,0 +1,26 @@ | |||
| 1 | name: Build | ||
| 2 | |||
| 3 | on: | ||
| 4 | push: | ||
| 5 | branches: [ $default-branch ] | ||
| 6 | |||
| 7 | jobs: | ||
| 8 | test: | ||
| 9 | runs-on: ubuntu-20.04 | ||
| 10 | |||
| 11 | steps: | ||
| 12 | - uses: actions/checkout@v2.3.4 | ||
| 13 | - name: Set up Ruby | ||
| 14 | uses: ruby/setup-ruby@v1.66.1 | ||
| 15 | with: | ||
| 16 | bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
| 17 | - name: Run tests | ||
| 18 | run: bundle exec rake | ||
| 19 | - name: Deploy to Heroku | ||
| 20 | uses: akhileshns/heroku-deploy@v3.12.12 | ||
| 21 | with: | ||
| 22 | heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
| 23 | heroku_app_name: "devdocs" | ||
| 24 | heroku_email: "team@freecodecamp.com" | ||
| 25 | dontuseforce: true # --force should never be necessary | ||
| 26 | dontautocreate: true # The app exists, it should not be created | ||
| @@ -1,26 +0,0 @@ | |||
| 1 | language: ruby | ||
| 2 | |||
| 3 | addons: | ||
| 4 | apt: | ||
| 5 | packages: | ||
| 6 | - libcurl4-openssl-dev | ||
| 7 | |||
| 8 | cache: bundler | ||
| 9 | |||
| 10 | before_install: | ||
| 11 | - "echo 'gem: --no-document' > ~/.gemrc" | ||
| 12 | - gem update --system | ||
| 13 | - gem install bundler | ||
| 14 | |||
| 15 | script: | ||
| 16 | - if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then bundle exec rake; fi | ||
| 17 | - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then bundle exec thor updates:check --github-token $GH_TOKEN --upload; fi | ||
| 18 | |||
| 19 | deploy: | ||
| 20 | provider: heroku | ||
| 21 | app: devdocs | ||
| 22 | on: | ||
| 23 | branch: master | ||
| 24 | condition: $TRAVIS_EVENT_TYPE != cron | ||
| 25 | api_key: | ||
| 26 | secure: NFfTIdMdNzm99u2bMq/iNo6Sl05XOcHvNEDrEpHvCWG79V1aTN53+sHww+PeTX1wgJA6ZrBAOyTduPlTZbmWH1iHkUhX2vagM1q680rJWkXccO42rJ1V0coKXIfN3/XYzim07YTT4PBdrDoBRd0NJN/fGXl6uNwBBX+7hHt5O4s= | ||