feat(ankify): nest synced decks per page, refresh styling, support No… #1195
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 to 2anki.net | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: main | |
| concurrency: | |
| group: 'production' | |
| cancel-in-progress: false | |
| steps: | |
| - name: SSH and run script | |
| uses: appleboy/ssh-action@v1.2.5 | |
| with: | |
| host: 2anki.net | |
| username: ${{ secrets.SSH_USERNAME }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| script: | | |
| SERVER_DIR=~/src/github.com/2anki/2anki.net | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
| nvm install $(cat ${SERVER_DIR}/.nvmrc) | |
| nvm use $(cat ${SERVER_DIR}/.nvmrc) | |
| node --version | |
| npm install -g pnpm | |
| git -C ${SERVER_DIR} clean -fd | |
| git -C ${SERVER_DIR} stash | |
| git -C ${SERVER_DIR} pull origin | |
| git -C ${SERVER_DIR} clean -fd | |
| pnpm --dir ${SERVER_DIR} install --frozen-lockfile | |
| pip install -r ${SERVER_DIR}/create_deck/requirements.txt | |
| pnpm --dir ${SERVER_DIR} run build | |
| pnpm --filter 2anki-web -C ${SERVER_DIR} build | |
| cd ${SERVER_DIR}/.. | |
| pm2 restart server --update-env |