Files
owof-announcements/.gitea/workflows/cicd.yaml
T
redglow 32ea4de8de
Build and Deploy / Build and Upload (push) Successful in 1m29s
Build and Deploy / Upload (push) Failing after 11s
ci: try download v4
2026-06-22 12:27:11 +02:00

63 lines
1.7 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://gitea.com/actions/download-artifact@v4
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 }}