quartz-research-note/.gitea/workflows/ci.yaml

31 lines
962 B
YAML
Raw Normal View History

name: Build
on:
push:
branches:
- v4
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: git config --global core.quotepath false
- uses: actions/checkout@v3
with:
fetch-depth: 0
2024-02-04 14:56:14 +00:00
- uses: https://github.com/actions/setup-node@v4
with:
2024-02-04 14:56:14 +00:00
version: 'latest'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- run: npm i
- run: npx quartz build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
2024-02-04 14:27:18 +00:00
- name: Create private key
run: |
echo "${{ secrets.PRIVATE_KEY }}" > /tmp/act_runner_key
chmod 600 /tmp/act_runner_key
- name: rsync public directory
run: |
2024-02-04 14:47:15 +00:00
rsync -avz --delete -e "ssh -i /tmp/act_runner_key -o StrictHostKeyChecking=no" ${{ gitea.workspace }}/public/* ${{ vars.WEBSERVER_USER }}@${{ vars.WEBSERVER_HOST }}:/var/www/html