-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,41 +22,41 @@ jobs: | |
with: | ||
path: ./kill-the-newsletter--${{ matrix.os }}--${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha }}.${{ matrix.os == 'windows' && 'zip' || 'tar.gz' }} | ||
name: kill-the-newsletter--${{ matrix.os }}--${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha }}.${{ matrix.os == 'windows' && 'zip' || 'tar.gz' }} | ||
- if: ${{ matrix.os == 'ubuntu' && startsWith(github.ref, 'refs/tags/v') }} | ||
uses: webfactory/ssh-agent@master | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
- if: ${{ matrix.os == 'ubuntu' && startsWith(github.ref, 'refs/tags/v') }} | ||
run: | | ||
cat >> ~/.ssh/known_hosts << "EOF" | ||
# $ ssh-keyscan kill-the-newsletter.com | ||
# kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
kill-the-newsletter.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDSx09epSENSE5QAUVe3fWEmMsBMUasFBYqXJMdcpakmt0dlaKgSLrgwXpks0yelHLnYqPv+PfKxIffR4t2tOa3HNAQSY7NHLyHbLW0RVAyEOkRflqUjNdpC8iv1lvF31ZwFtbLKQZ7iOZLkpLZjkfOfLZnBX8Kp+agLbX++BIWtsTEuLMQVzrUOch4EjoIWw2/+fKI4fkXvgPREaUsKEIA8vmyrym+A2pUu2+WFQe6FomhD6hlOUhutOKGOlEamWhQydV/6AIuyLI+k7rm2V7lhyRVSxRhMEjHMkKiDFVtMf2IpMBjEoSFdoWqqM3eDHVJTd9VRAtsD4cm7QoMm6bbZeNRRZppckvldQNTVZGxKpf3So1phf+O71WVRwRAzSkX8ywb6GbjQ0QtCBEVLRn2cbHv1TDaXlvDGCl2wpneO865b7XwCdMQ6/8q3k+zrPHWe/xxdNCoNTJKoxBWa/Ae5t7YW8GzIF1e5X12V8ePT2h/njEZLVLi0ckFn1ndPBs= | ||
# kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
kill-the-newsletter.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHME/qZBfCgIM4kgEG+o4m8kbykc8jq0wX95YiclHA6lAEtp/mnjhYRcL4SFFWdSdtlA4Xd5pxp9QIB8rrU9yHQ= | ||
# kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
kill-the-newsletter.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAT36G3KwKsiCaZujOaNYBJ8YWQbt9gt8tf3COVwn5ki | ||
# kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
# kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
EOF | ||
rsync -a ./kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz [email protected]:kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz | ||
ssh [email protected] << "EOF" | ||
mkdir -p /root/kill-the-newsletter/ | ||
rm -rf /root/kill-the-newsletter--deploy/ | ||
mkdir /root/kill-the-newsletter--deploy/ | ||
mv /root/kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz /root/kill-the-newsletter--deploy/kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz | ||
cd /root/kill-the-newsletter--deploy/ | ||
tar -xzf ./kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz | ||
cp /root/kill-the-newsletter--deploy/kill-the-newsletter/_/configuration/kill-the-newsletter.com.mjs /root/kill-the-newsletter/configuration.mjs | ||
cp /root/kill-the-newsletter--deploy/kill-the-newsletter/_/configuration/kill-the-newsletter.service /etc/systemd/system/kill-the-newsletter.service | ||
systemctl daemon-reload | ||
systemctl stop kill-the-newsletter | ||
mv /root/kill-the-newsletter/kill-the-newsletter/ /root/kill-the-newsletter--deploy/kill-the-newsletter--old/ || true | ||
mv /root/kill-the-newsletter--deploy/kill-the-newsletter/ /root/kill-the-newsletter/kill-the-newsletter/ | ||
systemctl start kill-the-newsletter | ||
systemctl enable kill-the-newsletter | ||
rm -rf /root/kill-the-newsletter--deploy/ | ||
EOF | ||
# - if: ${{ matrix.os == 'ubuntu' && startsWith(github.ref, 'refs/tags/v') }} | ||
# uses: webfactory/ssh-agent@master | ||
# with: | ||
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
# - if: ${{ matrix.os == 'ubuntu' && startsWith(github.ref, 'refs/tags/v') }} | ||
# run: | | ||
# cat >> ~/.ssh/known_hosts << "EOF" | ||
# # $ ssh-keyscan kill-the-newsletter.com | ||
# # kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
# kill-the-newsletter.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDSx09epSENSE5QAUVe3fWEmMsBMUasFBYqXJMdcpakmt0dlaKgSLrgwXpks0yelHLnYqPv+PfKxIffR4t2tOa3HNAQSY7NHLyHbLW0RVAyEOkRflqUjNdpC8iv1lvF31ZwFtbLKQZ7iOZLkpLZjkfOfLZnBX8Kp+agLbX++BIWtsTEuLMQVzrUOch4EjoIWw2/+fKI4fkXvgPREaUsKEIA8vmyrym+A2pUu2+WFQe6FomhD6hlOUhutOKGOlEamWhQydV/6AIuyLI+k7rm2V7lhyRVSxRhMEjHMkKiDFVtMf2IpMBjEoSFdoWqqM3eDHVJTd9VRAtsD4cm7QoMm6bbZeNRRZppckvldQNTVZGxKpf3So1phf+O71WVRwRAzSkX8ywb6GbjQ0QtCBEVLRn2cbHv1TDaXlvDGCl2wpneO865b7XwCdMQ6/8q3k+zrPHWe/xxdNCoNTJKoxBWa/Ae5t7YW8GzIF1e5X12V8ePT2h/njEZLVLi0ckFn1ndPBs= | ||
# # kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
# kill-the-newsletter.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHME/qZBfCgIM4kgEG+o4m8kbykc8jq0wX95YiclHA6lAEtp/mnjhYRcL4SFFWdSdtlA4Xd5pxp9QIB8rrU9yHQ= | ||
# # kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
# kill-the-newsletter.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAT36G3KwKsiCaZujOaNYBJ8YWQbt9gt8tf3COVwn5ki | ||
# # kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
# # kill-the-newsletter.com:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13 | ||
# EOF | ||
# rsync -a ./kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz [email protected]:kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz | ||
# ssh [email protected] << "EOF" | ||
# mkdir -p /root/kill-the-newsletter/ | ||
# rm -rf /root/kill-the-newsletter--deploy/ | ||
# mkdir /root/kill-the-newsletter--deploy/ | ||
# mv /root/kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz /root/kill-the-newsletter--deploy/kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz | ||
# cd /root/kill-the-newsletter--deploy/ | ||
# tar -xzf ./kill-the-newsletter--ubuntu--${{ github.ref_name }}.tar.gz | ||
# cp /root/kill-the-newsletter--deploy/kill-the-newsletter/_/configuration/kill-the-newsletter.com.mjs /root/kill-the-newsletter/configuration.mjs | ||
# cp /root/kill-the-newsletter--deploy/kill-the-newsletter/_/configuration/kill-the-newsletter.service /etc/systemd/system/kill-the-newsletter.service | ||
# systemctl daemon-reload | ||
# systemctl stop kill-the-newsletter | ||
# mv /root/kill-the-newsletter/kill-the-newsletter/ /root/kill-the-newsletter--deploy/kill-the-newsletter--old/ || true | ||
# mv /root/kill-the-newsletter--deploy/kill-the-newsletter/ /root/kill-the-newsletter/kill-the-newsletter/ | ||
# systemctl start kill-the-newsletter | ||
# systemctl enable kill-the-newsletter | ||
# rm -rf /root/kill-the-newsletter--deploy/ | ||
# EOF | ||
|
||
release: | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
|