-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
91 additions
and
86 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,40 +7,37 @@ on: | |
paths: | ||
- frontend/** | ||
- .github/workflows/build-frontend.yml | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- frontend/** | ||
- .github/workflows/build-frontend.yml | ||
|
||
jobs: | ||
build-online: | ||
build-rpv-web: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout ${{ github.event.repository.name }} | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
- name: Install V | ||
uses: vlang/setup-[email protected] | ||
with: | ||
node-version: '20.x' | ||
version: '0.4' | ||
|
||
- name: Build Frontend | ||
working-directory: frontend | ||
- name: Install mingw | ||
run: | | ||
npm install | ||
npm run build | ||
sudo apt install -y gcc-mingw-w64 | ||
- name: Build rpv-web | ||
run: | | ||
make | ||
- name: Archive online application | ||
- name: Archive rpv-web | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: rpv-web-online | ||
path: frontend/dist | ||
name: rpv-web-x64 | ||
path: rpv-web-x64.exe | ||
|
||
build-offline: | ||
build-frontend: | ||
runs-on: ubuntu-latest | ||
needs: build-rpv-web | ||
|
||
steps: | ||
- name: Checkout ${{ github.event.repository.name }} | ||
|
@@ -55,10 +52,17 @@ jobs: | |
working-directory: frontend | ||
run: | | ||
npm install | ||
npm run build -- --mode offline | ||
npm run build | ||
- name: Download rpv-web-x64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: rpv-web-x64 | ||
|
||
- name: Archive offline application | ||
- name: Archive frontend and rpv-web | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: rpv-web-offline | ||
path: frontend/dist | ||
name: rpv-web-x64 | ||
path: | | ||
frontend | ||
rpv-web-x64.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Build Offline Frontend | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- frontend/** | ||
- .github/workflows/build-offline-frontend.yml | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: 'pages' | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build-offline: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout ${{ github.event.repository.name }} | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: Build Frontend | ||
working-directory: frontend | ||
run: | | ||
npm install | ||
npm run build -- --mode offline | ||
- name: Archive offline frontend | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: rpv-web-offline | ||
path: 'frontend/dist' | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: 'frontend/dist' | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
needs: build-offline | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |