-
Notifications
You must be signed in to change notification settings - Fork 115
65 lines (53 loc) · 1.79 KB
/
main.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
60
61
62
63
64
65
name: CI
on:
pull_request:
push:
branches:
- master
- deployment-test
# For scheduled deployment with Cron Jobs.
## Examples of cron schedule expressions:
### '0 * * * *': hourly
### '0 0 * * *': daily
### '0 0 1 * *': monthly
# schedule:
# - cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Install dependencies
run: pip install requests
- name: Generate report
run: |
export VITE_BASE_DIR="/$(basename $GITHUB_REPOSITORY)/"
echo "VITE_BASE_DIR: $VITE_BASE_DIR"
./run.sh
- name: Deploy GitHub pages
if : github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/deployment-test')
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./reposense-report
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: Rebuild pages at
- name: Test remote URL
run: curl -L https://${USERNAME}.github.io/${REPONAME}/
env:
USERNAME: ${{github.repository_owner}}
REPONAME: ${{github.event.repository.name}}
- name: Test deployed web page
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/deployment-test')
uses: treosh/lighthouse-ci-action@v12
with:
urls: https://${{github.repository_owner}}.github.io/${{github.event.repository.name}}
uploadArtifacts: true
- name: Display Lighthouse Summary
run: cat .lighthouseci/manifest.json | jq '.'