fix: align legacy theme menu layout #94
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: React test-server CI/CD | |
| on: | |
| push: | |
| branches: | |
| - RinNET-frontend-revived | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: test-server-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build the React app | |
| run: npm run build | |
| - name: Compress dist folder | |
| run: tar -czf dist.tar.gz dist/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: react-dist | |
| path: dist.tar.gz | |
| retention-days: 3 | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: react-dist | |
| - name: Copy files to test server | |
| uses: appleboy/scp-action@master | |
| with: | |
| host: ${{ secrets.REMOTE_HOST }} | |
| username: ${{ secrets.REMOTE_USER }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| port: 22 | |
| source: dist.tar.gz | |
| target: /root/ | |
| - name: Activate deployment in nginx container | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.REMOTE_HOST }} | |
| username: ${{ secrets.REMOTE_USER }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| port: 22 | |
| script: | | |
| set -euo pipefail | |
| cd /root | |
| rm -rf dist | |
| tar -xzf dist.tar.gz | |
| docker exec nginx rm -rf /var/www/portal | |
| docker cp /root/dist nginx:/var/www/portal | |
| echo "Finished React test-server deployment for ${{ github.sha }}" |