Skip to content

Commit

Permalink
feat: workflow overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtrazy committed Aug 7, 2024
1 parent 0f3e7a4 commit 967487c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 49 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@
name: La Fresca Frontend Build
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to server

on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
pull_request:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Frontend-Build
uses: appleboy/[email protected]
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_VITE_API_URL: 'https://lafresca-api.ucsc.eu.org/api/lafresca'
envkey_VITE_UPLOAD_URL: ${{ secrets.UPLOAD_URL }}
envkey_COOKIE_PROTOCOL: 'https:'
file_name: .env
- name: Build
run: npm run build
- name: Upload artifact
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: ./lafresca-frontend-action.sh
source: './dist'
target: '/var/www/lafresca-frontend/html'
rm: true
42 changes: 0 additions & 42 deletions .github/workflows/static.yml

This file was deleted.

0 comments on commit 967487c

Please sign in to comment.