Prep website workflow #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Website | |
on: | |
push: | |
branches: [ "main" ] | |
tags: | |
- 'v*' | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Docker login | |
env: | |
DOCKER_USER: ${{secrets.DOCKER_USER}} | |
DOCKER_PSWD: ${{secrets.DOCKER_PSWD}} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_PSWD | |
- name: Docker build and push | |
env: | |
DOCKER_USER: ${{secrets.DOCKER_USER}} | |
DOCKER_PSWD: ${{secrets.DOCKER_PSWD}} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_PSWD | |
docker build . -t michaelthamm/website:$GITHUB_REF_NAME | |
docker push michaelthamm/website:$GITHUB_REF_NAME | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: akhileshns/[email protected] | |
with: | |
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | |
heroku_email: ${{secrets.HEROKU_EMAIL}} | |
heroku_app_name: "michaelthamm-website" |