Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
71eb455
Update Github Actions publish preview
CYX22222003 Feb 14, 2025
a1ac100
Add newline at yml
CYX22222003 Feb 14, 2025
405610a
Merge branch 'master' into update-github-actions
CYX22222003 Feb 15, 2025
94a6bf9
Add manual dispatch
CYX22222003 Feb 16, 2025
28f843a
Merge branch 'update-github-actions' of https://github.com/CYX2222200…
CYX22222003 Feb 16, 2025
73bdc7c
Merge pull request #2 from CYX22222003/update-github-actions
CYX22222003 Feb 16, 2025
d3b114a
Update publish-preview.yml
CYX22222003 Feb 16, 2025
0157e84
Remove redundant unzip
CYX22222003 Feb 16, 2025
95de51f
Merge pull request #3 from CYX22222003/update-github-actions
CYX22222003 Feb 16, 2025
0bc09b3
Trigger another PR
CYX22222003 Feb 16, 2025
40a0971
Add test for connection
CYX22222003 Feb 16, 2025
21cce12
Correct formatting errors
CYX22222003 Feb 16, 2025
ff69ad3
Merge pull request #4 from CYX22222003/update-github-actions
CYX22222003 Feb 16, 2025
7cc8ead
Add lighthouse ci to audit url
CYX22222003 Feb 16, 2025
39308eb
Update target URL
CYX22222003 Feb 16, 2025
e3dffbe
Update target URL again
CYX22222003 Feb 16, 2025
3479364
Attempt to add URL auditting (#5)
CYX22222003 Feb 16, 2025
10b6c30
Update URL once again
CYX22222003 Feb 16, 2025
d43349c
Merge branch 'master' into update-github-actions
CYX22222003 Feb 16, 2025
bed7722
Trigger CI runs again (#6)
CYX22222003 Feb 16, 2025
e7ef719
Update target with correct publish dir
CYX22222003 Feb 16, 2025
67562f7
Merge branch 'update-github-actions' of https://github.com/CYX2222200…
CYX22222003 Feb 16, 2025
e8f9b97
Merge branch 'master' into update-github-actions
CYX22222003 Feb 16, 2025
01b2f75
Test whether the URL is correct (#7)
CYX22222003 Feb 16, 2025
cf9a583
Update target with correct publish dir
CYX22222003 Feb 16, 2025
695e4a6
Merge branch 'master' into update-github-actions
CYX22222003 Feb 16, 2025
47c2072
Remove redundant step
CYX22222003 Feb 16, 2025
762d83a
Merge branch 'update-github-actions' of https://github.com/CYX2222200…
CYX22222003 Feb 16, 2025
c0f3761
Merge branch 'master' into update-github-actions
CYX22222003 Feb 16, 2025
28226fd
Update publish-preview.yml
CYX22222003 Feb 17, 2025
4c19fb4
Add undoing of preview deployment
CYX22222003 Feb 17, 2025
053c5fe
Add conditions for redo
CYX22222003 Feb 17, 2025
9e7049e
Merge branch 'master' into update-github-actions
CYX22222003 Feb 17, 2025
1490d1c
Merge with master
CYX22222003 Feb 17, 2025
22db1d0
Test after enabling github pages (#9)
CYX22222003 Feb 17, 2025
134e517
Add user email and name
CYX22222003 Feb 17, 2025
3739aaf
Merge branch 'master' into update-github-actions
CYX22222003 Feb 17, 2025
b225995
Add testing for existence of files
CYX22222003 Feb 17, 2025
698327e
Add empty commit
CYX22222003 Feb 17, 2025
647bfcc
Trigger rerun of github actions
CYX22222003 Feb 17, 2025
4e037c3
Remove setting up java env
CYX22222003 Feb 17, 2025
160a99e
Upgrade action version
CYX22222003 Feb 17, 2025
bb3371d
Upgrade action version
CYX22222003 Feb 17, 2025
a9349de
Remove unwanted flag
CYX22222003 Feb 17, 2025
cda4bb5
Audit websites on gh-pages containers
CYX22222003 Feb 20, 2025
5a34c82
Merge branch 'master' into update-github-actions
CYX22222003 Feb 20, 2025
433a2d9
Remove trailing whitespace
CYX22222003 Feb 20, 2025
f7b04f3
Update GitHub actions (#15)
CYX22222003 Feb 20, 2025
211eafd
Update publish-preview.yml
CYX22222003 Feb 20, 2025
1dff7a1
Merge branch 'master' into update-github-actions
CYX22222003 Feb 20, 2025
971a0e9
Update publish-preview.yml
CYX22222003 Feb 20, 2025
81a8b3a
Update publish-preview.yml
CYX22222003 Feb 20, 2025
438b43d
Correct publish preview script
CYX22222003 Feb 20, 2025
bc2d811
Resolve merging conflict
CYX22222003 Feb 20, 2025
4af9766
Update url
CYX22222003 Feb 20, 2025
303c6bb
Update GitHub actions (#18)
CYX22222003 Feb 20, 2025
36cc8cf
Combine steps
CYX22222003 Feb 20, 2025
d96d533
Update test time
CYX22222003 Feb 20, 2025
abd32f2
Merge branch 'master' into update-github-actions
CYX22222003 Feb 20, 2025
8f3ea86
Remove uncessary lines
CYX22222003 Feb 20, 2025
c9955ed
Merge branch 'master' into update-github-actions
CYX22222003 Feb 25, 2025
4ebc00a
Merge branch 'master' into update-github-actions
CYX22222003 Mar 2, 2025
48e794c
Merge branch 'master' into update-github-actions
CYX22222003 Mar 3, 2025
60c1a23
Merge branch 'master' into update-github-actions
CYX22222003 Mar 3, 2025
ceac6d4
Merge branch 'master' into update-github-actions
CYX22222003 Mar 3, 2025
c32beff
Merge branch 'master' into update-github-actions
CYX22222003 Mar 5, 2025
cc5081c
Remove redundant files
CYX22222003 Mar 6, 2025
2e35b08
Merge branch 'update-github-actions' of https://github.com/CYX2222200…
CYX22222003 Mar 6, 2025
3b226db
Update manual check
CYX22222003 Mar 6, 2025
6d9cfd5
Correct environmental checks errors
CYX22222003 Mar 6, 2025
f22b934
Add environment variables
CYX22222003 Mar 6, 2025
156e889
Squash merge
CYX22222003 Mar 6, 2025
d2a8e2d
Add input for PR number
CYX22222003 Mar 6, 2025
a775635
Squash merge with master
CYX22222003 Mar 6, 2025
292a90d
Modify pr fake commit name
CYX22222003 Mar 6, 2025
b8541de
Squash merge again
CYX22222003 Mar 6, 2025
d5e81df
Update devOps guide
CYX22222003 Mar 6, 2025
8be1bd4
Update devOps guide
CYX22222003 Mar 6, 2025
931e4c5
Merge branch 'master' into update-github-actions
CYX22222003 Mar 15, 2025
5f8dda5
Merge remote-tracking branch 'upstream/master'
CYX22222003 Mar 17, 2025
e384314
Add setting for vite env
CYX22222003 Mar 17, 2025
03a6966
Merge branch 'update-github-actions' of https://github.com/CYX2222200…
CYX22222003 Mar 17, 2025
ce555c7
Merge branch 'master' into update-github-actions
CYX22222003 Mar 17, 2025
2706437
Update GitHub actions (#29)
CYX22222003 Mar 17, 2025
74edf85
Remove trailing spaces
CYX22222003 Mar 17, 2025
78eb439
Update test condition to test URL routing
CYX22222003 Mar 17, 2025
9555129
Update GitHub actions (#30)
CYX22222003 Mar 17, 2025
fa170bc
Install bundler
CYX22222003 Mar 17, 2025
6c499e3
Update deployed URL
CYX22222003 Mar 17, 2025
2429bc4
Merge branch 'master' into update-github-actions
CYX22222003 Mar 17, 2025
cb289a0
Update GitHub actions (#31)
CYX22222003 Mar 17, 2025
6723738
Remove wrong command to set up environment of Vite
CYX22222003 Mar 17, 2025
bb74639
Remove wrong command to set up environment of Vite
CYX22222003 Mar 17, 2025
9793aeb
Remove wrong command to set up environment of Vite
CYX22222003 Mar 17, 2025
8b3b9f1
Remove redundant vite setup
CYX22222003 Mar 17, 2025
d17e71d
Initialize ruby environment
CYX22222003 Mar 17, 2025
49f79d3
Merge branch 'update-github-actions'
CYX22222003 Mar 17, 2025
b9fde3c
Set up vite environment variable
CYX22222003 Mar 17, 2025
ef817d1
Add gemfile
CYX22222003 Mar 17, 2025
1f271e5
Install jekyll
CYX22222003 Mar 17, 2025
e1e406a
Add detach flag
CYX22222003 Mar 17, 2025
03c5a3c
Modify published paths
CYX22222003 Mar 17, 2025
2b3c44c
Update correct URL for lighthouse ci
CYX22222003 Mar 17, 2025
c10b849
Update URL again
CYX22222003 Mar 17, 2025
a8b66e6
Remove trailing whitespaces
CYX22222003 Mar 17, 2025
09ba696
Remove reposense log
CYX22222003 Mar 17, 2025
1fd16b9
Merge branch 'master' into update-github-actions
CYX22222003 Mar 20, 2025
01cfc85
Merge branch 'master' into update-github-actions
CYX22222003 Mar 24, 2025
64851a7
Update URLs
CYX22222003 Mar 24, 2025
421b88c
Revert URL
CYX22222003 Mar 24, 2025
0077206
Delete .github/workflows/publish-preview.yml
CYX22222003 Mar 24, 2025
ca299e2
Update github action
CYX22222003 Mar 31, 2025
94e8f26
Merge branch 'master' into update-github-actions
CYX22222003 Apr 16, 2025
babe892
Merge branch 'master' into update-github-actions
CYX22222003 Apr 18, 2025
3c50bd5
Merge branch 'master' into update-github-actions
CYX22222003 May 20, 2025
30ae8ac
Merge branch 'master' into update-github-actions
CYX22222003 Jul 26, 2025
3799396
Merge branch 'master' into update-github-actions
CYX22222003 Jan 15, 2026
69e1eb3
Merge branch 'master' into update-github-actions
CYX22222003 Feb 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions .github/workflows/publish-preview-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: GitHub Actions preview build manual

on:
workflow_dispatch:
inputs:
pr_number:
description: 'PR number'
required: true
type: string

env:
NODE_VER: '20.x'
JAVA_DISTRIBUTION: 'zulu'
JAVA_VER: 11

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: refs/pull/${{ github.event.inputs.pr_number }}/merge
fetch-depth: 0

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'

- name: Install Jekyll
run: gem install jekyll

- name: Initialize Jekyll site
run: |
jekyll new --skip-bundle ${{ github.workspace }}/reposense-report
env:
JEKYLL_ENV: production

- name: Set up Vite environment
run: |
export VITE_BASE_DIR="/$(basename $GITHUB_REPOSITORY)"
echo "VITE_BASE_DIR: $VITE_BASE_DIR"

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VER }}

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VER }}

- name: Set up Gradle caching
uses: actions/cache@v3
with:
path: |
$HOME/.gradle/caches
$HOME/.gradle/wrapper
key: ${{ matrix.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ matrix.os }}-gradle-

- name: Set up Node caching
uses: actions/cache@v3
with:
path: $HOME/.npm
key: ${{ matrix.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-node-

- name: Grant execute permission for gradlew
if: ${{ runner.os != 'Windows' }}
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew run

- name: Run local website on action runner
run: |
gem install bundler
cd ${SITE}
bundle install
bundle exec jekyll serve --detach
env:
SITE: ${{github.workspace}}/reposense-report

- name: Wait for the service to start
run: sleep 10

- name: Test connection to deployed website
run: curl -L http://0.0.0.0:4000/$VITE_BASE_DIR

- name: Test deployed web page
uses: treosh/lighthouse-ci-action@v12
with:
urls: http://0.0.0.0:4000/${{ env.VITE_BASE_DIR }}
uploadArtifacts: true

- name: Display Lighthouse summary
run: cat .lighthouseci/manifest.json | jq '.'
9 changes: 9 additions & 0 deletions docs/dg/devOpsGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,12 @@ For authentication, two secrets are stored and used in GitHub Actions:
The `surge` command automatically detects the existence of these two environment variables and use them for authentication when deploying the RepoSense report and documentation build previews.

Currently, deployments are kept forever, even after the pull request is merged or closed. There is currently no existing functionality to automatically clean up deployments after they are no longer useful.

<!-- ==================================================================================================== -->

## Post-deployment test
Publish-RepoSense is our default tool for deploying RepoSense reports. We have automated the testing of deployments via this tool before each merge to strengthen our CI/CD processes. This is automatically performed by the job "GitHub Actions build preview" using the [`publish-preview.yml`](https://github.com/reposense/RepoSense/blob/master/config/gh-actions/publish-preview.yml).

There is a manual action named `GitHub Actions preview build manual` using the [`publish-preview-manual.yml`](https://github.com/reposense/RepoSense/blob/master/config/gh-actions/publish-preview-manual.yml). It takes in an input of the PR number and run the test on the branch referring to the PR.

The action will simulate a `jekyll build` environment using docker container on the GitHub action runner and audit the webpage using `lighthoucse-ci`, detecting potential issues in rendering the dashboard in actual github environments.
Loading