-
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (42 loc) · 1.27 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
path: 'repo'
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
run: (cd repo; hugo --gc --minify -b "https://cs.rit.edu/~dataunitylab/")
- name: Move deploy to top level
run: shopt -s dotglob; mv repo/public/* "$GITHUB_WORKSPACE"; rm -rf repo
- name: Fix index path
run: sed -i 's/\/index.json/\/~dataunitylab\/index.json/' en/js/wowchemy.min.*.js
- name: Set .htaccess permissions
run: chmod a+r .htaccess
- name: Deploy via rsync
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-avzr --delete --exclude ${{ secrets.INDEXNOW_KEY }}.txt"
SOURCE: .
REMOTE_HOST: glados.cs.rit.edu
REMOTE_USER: dataunitylab
TARGET: .
- name: indexnow-action
uses: bojieyang/indexnow-action@v1
with:
sitemap-location: 'https://cs.rit.edu/~dataunitylab/sitemap.xml'
key: ${{ secrets.INDEXNOW_KEY }}