Skip to content

[#2285] Add post-deployment test actions #32

[#2285] Add post-deployment test actions

[#2285] Add post-deployment test actions #32

Workflow file for this run

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: Upload report artifact
uses: actions/upload-artifact@v4
with:
name: reposense-report
path: ./reposense-report
deploy:
needs: build
runs-on: ubuntu-22.04
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/deployment-test')
steps:
- name: Download Report Artifact
uses: actions/download-artifact@v4
with:
name: reposense-report
path: ./reposense-report
- name: Deploy GitHub pages
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 connection to 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
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 '.'