Skip to content

Update: Change location #37

Update: Change location

Update: Change location #37

Workflow file for this run

name: Jekyll site CI
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the site in the jekyll/builder container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: dist-site
path: _site
deploy:
needs: build
runs-on: ubuntu-latest
environment: tencent-light-server-blog
steps:
- name: Download site
uses: actions/download-artifact@v2
with:
name: dist-site
path: _site
- uses: matheusvanzan/sshpass-action@v2
with:
host: ${{ secrets.BLOG_HOST }}
user: ${{ secrets.BLOG_USER }}
pass: ${{ secrets.BLOG_PASSWORD }}
- run: |
sshpass -p '${{secrets.BLOG_PASSWORD}}' rsync ./_site/ -r -e 'ssh -o StrictHostKeyChecking=no' ${{secrets.BLOG_USER}}@${{secrets.BLOG_HOST}}:${{secrets.BLOG_PATH}}