Fit gallery item to whole width on mobile #16
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: CI | |
| on: | |
| push: | |
| jobs: | |
| lint: | |
| name: 'Lint code' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: Cache node_modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Copy env | |
| run: cp .env.example .env | |
| - name: Build | |
| run: pnpm run build | |
| - name: Check lint | |
| run: pnpm run lint | |
| - name: TypeScript check | |
| run: pnpm run check | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Deploy via SSH | |
| uses: appleboy/ssh-action@v1.2.0 | |
| with: | |
| host: ${{ secrets.HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| port: ${{ secrets.PORT }} | |
| key: ${{ secrets.SSH_KEY }} | |
| script: | | |
| cd /opt/NodeApps/Web | |
| echo "Setting up nvm" | |
| export NVM_DIR="$HOME/.nvm" | |
| source "$NVM_DIR/nvm.sh" | |
| nvm use | |
| echo "Pulling latest changes from git" | |
| git pull | |
| echo "Installing dependencies" | |
| npm install -g pnpm | |
| echo "Installing dependencies" | |
| pnpm install --frozen-lockfile | |
| echo "Building the app" | |
| pnpm run build | |
| echo "Run migrations" | |
| pnpm run migrate | |
| echo "Restarting the app" | |
| sudo systemctl restart web | |
| echo "Deployment completed" | |
| deploybeta: | |
| name: DeployBeta | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Deploy via SSH | |
| uses: appleboy/ssh-action@v1.2.0 | |
| with: | |
| host: ${{ secrets.HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| port: ${{ secrets.PORT }} | |
| key: ${{ secrets.SSH_KEY }} | |
| script: | | |
| cd /opt/NodeApps/WebBeta | |
| echo "Setting up nvm" | |
| export NVM_DIR="$HOME/.nvm" | |
| source "$NVM_DIR/nvm.sh" | |
| nvm use | |
| echo "Pulling latest changes from git" | |
| git pull | |
| echo "Installing dependencies" | |
| npm install -g pnpm | |
| echo "Installing dependencies" | |
| pnpm install --frozen-lockfile | |
| echo "Building the app" | |
| pnpm run build | |
| echo "Run migrations" | |
| pnpm run migrate | |
| echo "Restarting the app" | |
| sudo systemctl restart web-beta | |
| echo "Deployment completed" |