Files
owof-announcements/.gitea/workflows/cicd.yaml
T
redglow e577748914
Build and Deploy / Build and Upload (push) Successful in 1m13s
Build and Deploy / Upload (push) Failing after 8s
ci: download artifact
2026-06-22 13:35:19 +02:00

69 lines
1.8 KiB
YAML

name: Build and Deploy
run-name: Build And Deploy (by ${{ gitea.actor }}) 🚀
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
name: Build and Upload
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Install yarn
shell: bash
run: npm i yarn -g
- name: Yarn install (dev)
shell: bash
run: yarn install
- name: Vite build
shell: bash
run: ./node_modules/.bin/vite build
- name: Yarn install (prod)
shell: bash
run: rm -rf node_modules && yarn install --production=true
- name: Publish artifacts
uses: https://gitea.com/actions/gitea-upload-artifact@v4
with:
name: artifact
path: |
dist
index.html
node_modules
package.json
public
src
tsconfig.json
vite.config.json
yarn.lock
Upload:
steps:
- name: Download artifacts
uses: https://github.com/christopherHX/gitea-download-artifact@v4
with:
name: artifact
path: /root/artifact
- name: Upload to server
run: |
echo "la current dir"
ls -la
echo "la home"
ls -la ~
echo "la root"
ls -la /root
mkdir -p ~/.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 }}