History

feat: deploy via GitHub action

Oliver Eyton-Williams committed 5 years ago

Commit 9bbfda11 parent 3a35f482 files · +26 −26Browse files

Unified · Split

2 files
  1. .github/workflows/build.yml +26 −0
  2. .travis.yml +0 −26
.github/workflows/build.yml+26−0
@@ -0,0 +1,26 @@
1name: Build
2
3on:
4 push:
5 branches: [ $default-branch ]
6
7jobs:
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
.travis.yml+0−26
@@ -1,26 +0,0 @@
1language: ruby
2
3addons:
4 apt:
5 packages:
6 - libcurl4-openssl-dev
7
8cache: bundler
9
10before_install:
11 - "echo 'gem: --no-document' > ~/.gemrc"
12 - gem update --system
13 - gem install bundler
14
15script:
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
19deploy:
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=