Skip to content

Commit

Permalink
Create deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek-12 authored Feb 8, 2025
1 parent 369af77 commit aceda30
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
on:
push:
branches: [ master ]
workflow_dispatch:

concurrency:
group: "deploy"
cancel-in-progress: true

permissions:
contents: read
pages: write
id-token: write

jobs:
docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
check-latest: true
java-version: 23
cache: 'gradle'

- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v4

- name: Create local properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: echo "$LOCAL_PROPERTIES" | base64 --decode > local.properties

- name: Cache konan directory
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('*.gradle.kts', 'buildSrc/*') }}
restore-keys: |
${{ runner.os }}-konan-
- uses: actions/setup-node@v4
with:
node-version: 23
cache: npm
cache-dependency-path: './docs/package-lock.json'

- name: Create sample app distributable
run: ./gradlew wasmJsBrowserDistribution --no-configuration-cache

- name: Move assembled sample app to docs folder
run: cp -r ./sample/build/dist/wasmJs/productionExecutable/ ./dist/

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload pages
uses: actions/upload-pages-artifact@v3
with:
path: './dist/'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit aceda30

Please sign in to comment.