CI
Some checks failed
CI / Check typos (push) Successful in 10s
CI / Check links (push) Failing after 53s
CI / Clippy (push) Successful in 54s
CI / Build and test (push) Successful in 56s
CI / Build container (push) Successful in 1m26s
CI / Deploy on waypoint (push) Failing after 2s
Some checks failed
CI / Check typos (push) Successful in 10s
CI / Check links (push) Failing after 53s
CI / Clippy (push) Successful in 54s
CI / Build and test (push) Successful in 56s
CI / Build container (push) Successful in 1m26s
CI / Deploy on waypoint (push) Failing after 2s
This commit is contained in:
@@ -166,23 +166,33 @@ jobs:
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
# Tags looks like ghcr.io/user/app:latest
|
||||
|
||||
# - name: Setup SSH
|
||||
# if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' }}
|
||||
# run: |
|
||||
# mkdir -p ~/.ssh
|
||||
# echo "${{ secrets.DEPLOY_SSH_PRIV_KEY }}" > ~/.ssh/id_ed25519
|
||||
# chmod 600 ~/.ssh/id_ed25519
|
||||
# eval "$(ssh-agent -s)"
|
||||
# ssh-add ~/.ssh/id_ed25519
|
||||
# ssh-keyscan -p 5342 waypoint.betalupi.com >> ~/.ssh/known_hosts
|
||||
deploy:
|
||||
name: "Deploy on waypoint"
|
||||
runs-on: ubuntu-latest
|
||||
# Only run on push to main or workflow_dispatch
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
|
||||
needs:
|
||||
- docker
|
||||
|
||||
# - name: Deploy
|
||||
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
# run: |
|
||||
# cat "site.tar.gz" | \
|
||||
# ssh mark@waypoint.betalupi.com -p 5342 \
|
||||
# "
|
||||
# cat > /home/mark/site.tar.gz; \
|
||||
# rm -dfr /var/www/site/public; \
|
||||
# tar -xf site.tar.gz --directory=/var/www/site;
|
||||
# "
|
||||
steps:
|
||||
- name: Setup SSH
|
||||
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.DEPLOY_SSH_PRIV_KEY }}" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
eval "$(ssh-agent -s)"
|
||||
ssh-add ~/.ssh/id_ed25519
|
||||
ssh-keyscan -p 5342 waypoint.betalupi.com >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Deploy
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
cat "site.tar.gz" | \
|
||||
ssh mark@waypoint.betalupi.com -p 5342 \
|
||||
"
|
||||
cd /home/mark/docker/betalupi-webpage; \
|
||||
docker compose down; \
|
||||
docker image prune -af; \
|
||||
docker compose up -d;
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user