Skip to content

[ci] build with relative path #41

[ci] build with relative path

[ci] build with relative path #41

Workflow file for this run

name: deploy-app
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
env:
CI: false
VITE_GITHUB_PROXY: "https://githubapi.gephi.org"
VITE_MATOMO_URL: "https://matomo.ouestware.com"
VITE_MATOMO_SITEID: 32
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache node_modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install
run: npm install
- uses: nyaa8/package-version@v1
with:
path: "packages/gephi-lite/package.json"
- name: Build
run: npm run build
env:
BASE_URL: ./
- name: Create site folder
run: mkdir -p website/v${{ env.PACKAGE_VERSION }}
- name: Copy gephi lite files
run: cp -rf packages/gephi-lite/build/* website/v${{ env.PACKAGE_VERSION }}
- name: Create index page with redirection
run: |
cat <<EOF > website/index.html
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<noscript>
<meta http-equiv="refresh" content="0; url=https://gephi.org/gephi-lite/v${{ env.PACKAGE_VERSION }}/">
</noscript>
<script type="text/javascript">
window.location.href = "https://gephi.org/gephi-lite/v${{ env.PACKAGE_VERSION }}/" + (window.location.search || '') + (window.location.hash || '')
</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow this <a href='https://gephi.org/gephi-lite/v${{ env.PACKAGE_VERSION }}/'>link</a>.
</body>
</html>
EOF
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: website # The folder the action should deploy.
branch: gh-pages # The branch the action should deploy to.
clean: false # keep what is already in the directory