diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..417612a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy to Heroku + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Ruby 2.6.4 + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6.4 + + - name: Install dependencies + run: | + gem install bundler + bundle install + + - name: Deploy to Heroku + env: + HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} + run: | + git remote add heroku https://git.heroku.com/sthlmrb.git + git push heroku master