diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8808279..37a87a4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,7 +3,7 @@ on: [push, pull_request, workflow_dispatch] name: CI jobs: deploy: - name: Deploy + name: CI runs-on: ubuntu-latest env: GIT_SERVER: devops.lty.name @@ -16,23 +16,16 @@ jobs: git clone https://${{ github.token }}@${{ env.GIT_SERVER }}/${{ github.repository }} $(pwd) git lfs install git lfs pull - python3 --version - file images/*.webp - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.12' - # - name: Install dependencies & Build - # run: | - # pip install pdm==2.20.1 - # pdm install - # pdm start - # - if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' - # name: Deploy to the web server - # run: | - # mkdir -p "${HOME}/.ssh" - # echo "${DEPLOY_SSH_KEY}" | base64 -d > "${HOME}/.ssh/id_ed25519" - # chmod 600 "${HOME}/.ssh/id_ed25519" - # echo "${DEPLOY_SERVER} ${DEPLOY_SERVER_KEY}" > "${HOME}/.ssh/known_hosts" - # rsync -avz --delete ./dist/ "${DEPLOY_TARGET}:~/${DEPLOY_TARGET}/" - # env: - # DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }} + pip install pdm==2.20.1 + pdm install + pdm start + - name: deploy + if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' + run: | + mkdir -p "${HOME}/.ssh" + echo "${DEPLOY_SSH_KEY}" | base64 -d > "${HOME}/.ssh/id_ed25519" + chmod 600 "${HOME}/.ssh/id_ed25519" + echo "${DEPLOY_SERVER} ${DEPLOY_SERVER_KEY}" > "${HOME}/.ssh/known_hosts" + rsync -avz --delete ./dist/ "${DEPLOY_TARGET}:~/${DEPLOY_TARGET}/" + env: + DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}