Skip to content

Commit

Permalink
Add production deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
esDotDev committed Sep 26, 2024
1 parent b16c651 commit 7b96ce4
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build_and _deploy_web_production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Deploy to Production

on:
workflow_dispatch:

env:
BASE_HREF: "web"
REMOTE_DIR: "wonderous.app"
jobs:
build:
uses: ./.github/workflows/build_web.yml

deploy:
needs: build
runs-on: ubuntu-latest

steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: web-build
path: build/web

- name: Update base href in index.html
run: sed -i 's|<base href="/">|<base href="/${{ env.BASE_HREF }}/">|g' build/web/index.html

- name: Upload to SFTP
uses: wlixcc/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local_path: ./build/web/*
remote_path: ${{ env.REMOTE_DIR }}/web
sftp_only: true

0 comments on commit 7b96ce4

Please sign in to comment.