Skip to content

Update 07.07.2023

Update 07.07.2023 #104

Workflow file for this run

name: Deploy to production
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.17.6
- run: npm install
- run: npm run build
- run: mv dist/celeste-search/robots.prod.txt dist/celeste-search/robots.txt
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: dist
path: dist/celeste-search
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: dist
- name: Delete old files
uses: appleboy/[email protected]
with:
host: ${{ vars.DEPLOY_HOST }}
username: ${{ vars.DEPLOY_USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ vars.DEPLOY_PORT }}
script: |
cd ${{ vars.DEPLOY_TARGET_PROD }}
rm -rf *
- name: Upload files
uses: appleboy/[email protected]
with:
host: ${{ vars.DEPLOY_HOST }}
username: ${{ vars.DEPLOY_USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ vars.DEPLOY_PORT }}
strip_components: 1
source: "dist"
target: "${{ vars.DEPLOY_TARGET_PROD }}"