-
Notifications
You must be signed in to change notification settings - Fork 453
63 lines (54 loc) · 2.08 KB
/
make_site.yaml
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
# Workflow to build and deploy the web application to GitHub Pages
name: Publish Web App
# Trigger conditions for the workflow
on:
# Trigger on pull request close events to the dev branch
pull_request:
branches: [ "dev" ]
types: [ closed ]
# Manual trigger option from GitHub Actions UI
workflow_dispatch:
# Concurrency settings to manage multiple workflow runs
# This ensures orderly deployment to production environment
concurrency:
group: "pages"
# Don't cancel running deployments to ensure production stability
cancel-in-progress: false
jobs:
# Main job to build and deploy the web application
build_web_app:
# Configure deployment environment and URL
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Use Windows runner for build environment
runs-on: windows-latest
# Required permissions for GitHub Pages deployment
permissions:
contents: read # Read repository contents
pages: write # Write to GitHub Pages
id-token: write # Write authentication tokens
steps:
# Step 1: Check out the repository code
- uses: actions/checkout@v4
# Step 2: Set up Java development environment
- uses: actions/setup-java@v4
with:
distribution: 'zulu' # Use Zulu distribution of OpenJDK
java-version: 17 # Use Java 17 version
# Step 3: Build the Kotlin/JS web application
- name: Build Web(JS) App
run: ./gradlew jsBrowserDistribution
# Step 4: Configure GitHub Pages settings
- name: Setup Pages
uses: actions/configure-pages@v5
# Step 5: Upload the built web application as an artifact
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@v3
with:
# Path to the built web application files
path: './mifospay-web/build/dist/js/productionExecutable/'
# Step 6: Deploy the artifact to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment # ID used for environment URL output
uses: actions/deploy-pages@v4