-
-
Notifications
You must be signed in to change notification settings - Fork 19
38 lines (35 loc) · 1.02 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy
on:
push:
branches:
- main
permissions:
contents: write
deployments: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout commit
uses: actions/checkout@v4
with:
submodules: true
- name: Check for version change
id: check
uses: EndBug/version-check@v2
with:
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Tag new release
if: steps.check.outputs.changed == 'true'
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git tag v${{steps.check.outputs.version}}
git push origin v${{steps.check.outputs.version}}
- name: Deploy to Heroku
if: steps.check.outputs.changed == 'true'
uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "mdn-bcd-collector"
heroku_email: ${{secrets.HEROKU_EMAIL}}