Skip to content

Merge pull request #9 from taz717/dev_taz_indians_page #50

Merge pull request #9 from taz717/dev_taz_indians_page

Merge pull request #9 from taz717/dev_taz_indians_page #50

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 generate
env:
BASE_URL: https://www.projectceleste.com
- run: rm dist/README.md
- run: rm dist/robots.txt
- run: rm dist/.nojekyll
- run: mv dist/robots.prod.txt dist/robots.txt
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: dist
path: dist/
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/ssh-action@v0.1.3
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/scp-action@v0.1.3
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 }}"