-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 974 Bytes
/
generate.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
on: [push,]
name: "Generate Blog"
jobs:
generate-blog:
name: "Generate Blog"
runs-on: ubuntu-22.04
steps:
- name: "Checkout Blog Content"
uses: actions/checkout@v4
with:
path: "blog"
fetch-depth: "0"
- name: "Checkout Static Content"
uses: actions/checkout@v4
with:
ref: "gh-pages"
path: "pages"
fetch-depth: "0"
- name: "Generate Static Export"
uses: devcontainers/ci@v0.3
with:
subFolder: "blog"
runCmd: /var/www/html/.devcontainer/staticCreate.sh
push: never
- name: "Deploy 🚀"
run: |
rm -r pages/*
cp -r blog/static/* pages/
cd pages/
git config --global user.email "bot@cr0ydon.com"
git config --global user.name "CroydonBot"
ls -la
git add -A
now="$(date +'%Y-%m-%d %H:%M:%S')"
git diff-index --quiet HEAD || git commit -am "Export $now"
git push