Remove deploy action
This commit is contained in:
parent
01903f3547
commit
dd88bf11c8
144
.github/workflows/deploy.yml
vendored
144
.github/workflows/deploy.yml
vendored
|
@ -32,76 +32,76 @@ jobs:
|
||||||
git status
|
git status
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
deploy:
|
# deploy:
|
||||||
if: "github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Deploy')"
|
# if: "github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Deploy')"
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
name: Deploy
|
# name: Deploy
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
# - uses: actions/checkout@v2.3.4
|
||||||
- name: Notify deployment starting
|
# - name: Notify deployment starting
|
||||||
run: |
|
# run: |
|
||||||
git show --no-patch | curl \
|
# git show --no-patch | curl \
|
||||||
--fail-with-body \
|
# --fail-with-body \
|
||||||
-u "${{ secrets.NTFY_CREDS }}" \
|
# -u "${{ secrets.NTFY_CREDS }}" \
|
||||||
-H "X-Title: Deployment to nki-personal-do started" \
|
# -H "X-Title: Deployment to nki-personal-do started" \
|
||||||
-H "X-Priority: 1" \
|
# -H "X-Priority: 1" \
|
||||||
-H "X-Tags: cloud" \
|
# -H "X-Tags: cloud" \
|
||||||
-H "Actions: view, Open Job on GitHub, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
# -H "Actions: view, Open Job on GitHub, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
-d "Commit info:
|
# -d "Commit info:
|
||||||
" \
|
# " \
|
||||||
-d @- \
|
# -d @- \
|
||||||
https://ntfy.nkagami.me/nki-personal-do
|
# https://ntfy.nkagami.me/nki-personal-do
|
||||||
- name: Add SSH key
|
# - name: Add SSH key
|
||||||
env:
|
# env:
|
||||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||||
run: |
|
# run: |
|
||||||
mkdir -p /home/runner/.ssh
|
# mkdir -p /home/runner/.ssh
|
||||||
echo "${{ secrets.NIX_SECRETS_SSH_KEY }}" > /home/runner/.ssh/nix_secrets_key
|
# echo "${{ secrets.NIX_SECRETS_SSH_KEY }}" > /home/runner/.ssh/nix_secrets_key
|
||||||
echo "${{ secrets.NIX_DEPLOY_SSH_KEY }}" > /home/runner/.ssh/nix_deploy_key
|
# echo "${{ secrets.NIX_DEPLOY_SSH_KEY }}" > /home/runner/.ssh/nix_deploy_key
|
||||||
chmod 600 /home/runner/.ssh/*
|
# chmod 600 /home/runner/.ssh/*
|
||||||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
# ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
||||||
ssh-add /home/runner/.ssh/*
|
# ssh-add /home/runner/.ssh/*
|
||||||
ssh-keyscan ${{ secrets.INSTANCE_IP }} >> /home/runner/.ssh/known_hosts
|
# ssh-keyscan ${{ secrets.INSTANCE_IP }} >> /home/runner/.ssh/known_hosts
|
||||||
ssh-keyscan git.dtth.ch >> /home/runner/.ssh/known_hosts
|
# ssh-keyscan git.dtth.ch >> /home/runner/.ssh/known_hosts
|
||||||
- uses: cachix/install-nix-action@v20
|
# - uses: cachix/install-nix-action@v20
|
||||||
with:
|
# with:
|
||||||
extra_nix_config: |
|
# extra_nix_config: |
|
||||||
# Enable flakes
|
# # Enable flakes
|
||||||
experimental-features = nix-command flakes
|
# experimental-features = nix-command flakes
|
||||||
# Deploy tokens
|
# # Deploy tokens
|
||||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
# access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||||
# Import my substituters
|
# # Import my substituters
|
||||||
extra-substituters = https://natsukagami.cachix.org
|
# extra-substituters = https://natsukagami.cachix.org
|
||||||
extra-trusted-public-keys = natsukagami.cachix.org-1:3U6GV8i8gWEaXRUuXd2S4ASfYgdl2QFPWg4BKPbmYiQ=
|
# extra-trusted-public-keys = natsukagami.cachix.org-1:3U6GV8i8gWEaXRUuXd2S4ASfYgdl2QFPWg4BKPbmYiQ=
|
||||||
- name: Deploy with deploy-rs
|
# - name: Deploy with deploy-rs
|
||||||
env:
|
# env:
|
||||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||||
run: |
|
# run: |
|
||||||
nix run .#deploy-rs -- . --hostname ${{ secrets.INSTANCE_IP }} -s -- -L
|
# nix run .#deploy-rs -- . --hostname ${{ secrets.INSTANCE_IP }} -s -- -L
|
||||||
- name: Notify deployment succeeding
|
# - name: Notify deployment succeeding
|
||||||
run: |
|
# run: |
|
||||||
git show --no-patch | curl \
|
# git show --no-patch | curl \
|
||||||
--fail-with-body \
|
# --fail-with-body \
|
||||||
-u "${{ secrets.NTFY_CREDS }}" \
|
# -u "${{ secrets.NTFY_CREDS }}" \
|
||||||
-H "X-Title: Deployment to nki-personal-do succeeded" \
|
# -H "X-Title: Deployment to nki-personal-do succeeded" \
|
||||||
-H "X-Tags: tada,cloud" \
|
# -H "X-Tags: tada,cloud" \
|
||||||
-H "Actions: view, Open Job on GitHub, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
# -H "Actions: view, Open Job on GitHub, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
-d "Commit info:
|
# -d "Commit info:
|
||||||
" \
|
# " \
|
||||||
-d @- \
|
# -d @- \
|
||||||
https://ntfy.nkagami.me/nki-personal-do
|
# https://ntfy.nkagami.me/nki-personal-do
|
||||||
- name: Notify deployment failing
|
# - name: Notify deployment failing
|
||||||
if: ${{ failure() }}
|
# if: ${{ failure() }}
|
||||||
run: |
|
# run: |
|
||||||
git show --no-patch | curl \
|
# git show --no-patch | curl \
|
||||||
--fail-with-body \
|
# --fail-with-body \
|
||||||
-u "${{ secrets.NTFY_CREDS }}" \
|
# -u "${{ secrets.NTFY_CREDS }}" \
|
||||||
-H "X-Title: Deployment to nki-personal-do failed" \
|
# -H "X-Title: Deployment to nki-personal-do failed" \
|
||||||
-H "X-Priority: 4" \
|
# -H "X-Priority: 4" \
|
||||||
-H "X-Tags: warning,cloud" \
|
# -H "X-Tags: warning,cloud" \
|
||||||
-H "Actions: view, Open Job on GitHub, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
# -H "Actions: view, Open Job on GitHub, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
-d "Commit info:
|
# -d "Commit info:
|
||||||
" \
|
# " \
|
||||||
-d @- \
|
# -d @- \
|
||||||
https://ntfy.nkagami.me/nki-personal-do
|
# https://ntfy.nkagami.me/nki-personal-do
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue