Publish #46
This file contains hidden or 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
| name: deploy-app | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| 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: Copy CNAME files | |
| run: cp CNAME website/CNAME | |
| - name: Create index page with redirection | |
| run: | | |
| cat <<EOF > website/index.html | |
| <!DOCTYPE HTML> | |
| <html lang="en-US" prefix="og: https://ogp.me/ns#"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Gephi Lite</title> | |
| <meta name="description" content="Gephi Lite is an open-source web application dedicated to visual network analysis" /> | |
| <meta property="og:title" content="Gephi Lite" /> | |
| <meta property="og:description" content="Gephi Lite is an open-source web application dedicated to visual network analysis" /> | |
| <meta property="og:image" content="https://gephi.org/icons/gephi-lite-logo-inverted.svg" /> | |
| <meta property="og:url" content="https://lite.gephi.org/v${{ env.PACKAGE_VERSION }}/" /> | |
| <noscript> | |
| <meta http-equiv="refresh" content="0; url=https://lite.gephi.org/v${{ env.PACKAGE_VERSION }}/"> | |
| </noscript> | |
| <script type="text/javascript"> | |
| window.location.href = "https://lite.gephi.org/v${{ env.PACKAGE_VERSION }}/" + (window.location.search || '') + (window.location.hash || '') | |
| </script> | |
| </head> | |
| <body> | |
| If you are not redirected automatically, follow this <a href='https://lite.gephi.org/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 |