-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.61 KB
/
heroku-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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Deploy Website
on:
push:
branches: [ "main" ]
tags:
- 'v*'
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
test-local:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test index.html links
run: |
. ./app/tests/test-urls.sh
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"
test-deployed:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v10
with:
urls: |
https://www.michaelthamm.com/
budgetPath: ./app/tests/budget.json # test performance budgets
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage