ci: publish
This commit is contained in:
@@ -8,7 +8,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build and Upload
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Source Code
|
- name: Checkout Source Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -27,6 +27,7 @@ jobs:
|
|||||||
- name: Publish artifacts
|
- name: Publish artifacts
|
||||||
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: artifact
|
||||||
path: |
|
path: |
|
||||||
dist
|
dist
|
||||||
index.html
|
index.html
|
||||||
@@ -37,3 +38,26 @@ jobs:
|
|||||||
tsconfig.json
|
tsconfig.json
|
||||||
vite.config.json
|
vite.config.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
|
upload:
|
||||||
|
steps:
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
name: artifact
|
||||||
|
path: artifact
|
||||||
|
- name: Upload to server
|
||||||
|
run: |
|
||||||
|
mkdir ~/.ssh
|
||||||
|
chmod 600 ~/.ssh
|
||||||
|
echo "$SSH_KEYSCAN" > ~/.ssh/known_hosts
|
||||||
|
chmod 600 ~/.ssh/known_hosts
|
||||||
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
|
||||||
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
cd artifact
|
||||||
|
sftp owofannouncements@foxthesystem.space <<EOT
|
||||||
|
put -R . server
|
||||||
|
exit
|
||||||
|
EOT
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
SSH_KEYSCAN: ${{ secrets.SSH_KEYSCAN }}
|
||||||
Reference in New Issue
Block a user