diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7805bc71..d44b5473 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,15 +65,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.github_token }} REQUIREMENTS: docs/requirements.txt -# deploy: -# needs: test -# runs-on: ubuntu-latest -# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} -# steps: -# - uses: actions/checkout@v2 -# - name: Deploy demo -# uses: akhileshns/heroku-deploy@v3.12.12 -# with: -# heroku_api_key: ${{ secrets.HEROKU_API_KEY }} -# heroku_app_name: ${{ secrets.HEROKU_APP_NAME }} -# heroku_email: ${{ secrets.HEROKU_EMAIL }} + deploy-demo: + needs: test + runs-on: ubuntu-latest + environment: + name: demo + url: https://demo.baby-buddy.net + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + steps: + - uses: actions/checkout@v3 + - name: Deploy demo + run: npx railway up + env: + DJANGO_SETTINGS_MODULE: babybuddy.settings.railway + RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/demo-reset.yml b/.github/workflows/demo-reset.yml index c618a699..3be369b2 100644 --- a/.github/workflows/demo-reset.yml +++ b/.github/workflows/demo-reset.yml @@ -7,6 +7,9 @@ jobs: reset: name: Reset runs-on: ubuntu-latest + environment: + name: demo + url: https://demo.baby-buddy.net steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3