npm package: publish the package as @opencor/opencor. #62
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: CD (Development) | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| web_app: | |
| if: ${{ github.repository == 'opencor/webapp' }} | |
| name: Web app | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Set the timezone to New Zealand | |
| uses: szenius/set-timezone@v2.0 | |
| with: | |
| timezoneLinux: 'Pacific/Auckland' | |
| - name: Check out OpenCOR | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: OpenCOR dependencies | |
| run: pnpm install | |
| - name: Build OpenCOR's Web app | |
| run: pnpm build:web | |
| - name: Deploy to https://opencor.ws/appdev/ | |
| uses: milanmk/actions-file-deployer@master | |
| with: | |
| remote-protocol: sftp | |
| remote-host: ${{ secrets.REMOTE_HOST }} | |
| remote-user: ${{ secrets.REMOTE_USER }} | |
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| local-path: ./src/renderer/dist | |
| remote-path: /home/www/opencor.ws/appdev | |
| sync: full |