Skip to content

Fix restoring non-public saved view state #194

Fix restoring non-public saved view state

Fix restoring non-public saved view state #194

Workflow file for this run

name: Build Kotlin/JS, Angular, Spring and deploy site
on:
push:
branches:
- master
jobs:
Build-ckompiler-JS-Distribution:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Build with Gradle and cache
uses: burrunan/gradle-cache-action@v1
with:
arguments: jsBrowserProductionLibraryDistribution
- name: Archive JS artifacts
uses: actions/upload-artifact@v3
with:
name: ckompiler-js-dist
path: |
build/dist/js/productionLibrary/
!build/dist/js/productionLibrary/node_modules
!build/dist/js/productionLibrary/test
Build-Internals-Explorer-Angular:
runs-on: ubuntu-latest
needs: Build-ckompiler-JS-Distribution
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Cache node_modules
uses: actions/cache@v3
with:
path: internals-explorer/node_modules
key: ${{ runner.os }}-${{ hashFiles('internals-explorer/package-lock.json') }}
- name: Download ckompiler JS artifacts
uses: actions/download-artifact@v3
with:
name: ckompiler-js-dist
path: build/dist/js/productionLibrary/
- name: Install ckompiler.js node_modules
run: npm install
working-directory: build/dist/js/productionLibrary/
- run: npm install
working-directory: internals-explorer
- name: Run eslint
run: npx eslint 'src/**/*.ts'
working-directory: internals-explorer
- name: Angular Build
run: npx ng build --base-href /ckompiler/
working-directory: internals-explorer
- name: Archive Angular artifacts
uses: actions/upload-artifact@v3
with:
name: ckompiler-angular-dist
path: internals-explorer/dist/
Build-Internals-Explorer-Spring:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Build app with Gradle and cache
uses: burrunan/gradle-cache-action@v1
with:
build-root-directory: internals-explorer-backend
arguments: bootJar
- name: Archive spring boot jar
uses: actions/upload-artifact@v3
with:
name: internals-explorer-backend-jar
path: internals-explorer-backend/build/libs/internals-explorer-backend.jar
Docker-Internals-Explorer-Spring:
runs-on: ubuntu-latest
needs: Build-Internals-Explorer-Spring
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check out repository code
uses: actions/checkout@v3
- name: Get spring boot jar
uses: actions/download-artifact@v3
with:
name: internals-explorer-backend-jar
path: internals-explorer-backend
- name: Build and push docker image
run: |
docker buildx build \
--build-arg "JAR_FILE=./internals-explorer-backend.jar" \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/slak44/ckompiler-backend:latest \
--push \
internals-explorer-backend
Build-Sphinx-Docs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- uses: ammaraskar/sphinx-action@0.4
with:
docs-folder: 'documentation/'
- name: Archive Sphinx documentation artifacts
uses: actions/upload-artifact@v3
with:
name: ckompiler-sphinx-docs
path: documentation/build/html
Deploy-GH-Pages:
runs-on: ubuntu-latest
needs:
- Build-Internals-Explorer-Angular
- Build-Sphinx-Docs
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Get Angular artifacts
uses: actions/download-artifact@v3
with:
name: ckompiler-angular-dist
- run: mkdir documentation
working-directory: internals-explorer
- name: Get Sphinx artifacts
uses: actions/download-artifact@v3
with:
name: ckompiler-sphinx-docs
path: internals-explorer/documentation
- name: Fix 404 page for SPA routes
run: cp index.html 404.html
working-directory: internals-explorer
- name: Disable Jekyll Processing
run: touch .nojekyll
working-directory: internals-explorer
- name: Deploy to Github pages
uses: JamesIves/github-pages-deploy-action@v4
with:
single-commit: true
branch: gh-pages
folder: internals-explorer
Deploy-VM-Docker-Compose:
runs-on: ubuntu-latest
needs:
- Docker-Internals-Explorer-Spring
- Deploy-GH-Pages
steps:
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/id.key
chmod 600 ~/.ssh/id.key
cat >>~/.ssh/config <<END
Host machine
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/id.key
StrictHostKeyChecking no
END
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
- name: Run compose script
run: ssh machine './run-compose.sh'
concurrency:
group: env-${{ github.head_ref }}
cancel-in-progress: true