-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (59 loc) · 1.96 KB
/
deploy.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Deploy Site
# Heavily inspired by https://github.com/truemedian/discordia-docs/blob/a214cfeca711f0e33d0fa3b0ffc6545d09ee1c73/.github/workflows/release.yml
# and https://github.com/actions/starter-workflows/blob/main/pages/static.yml.
on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
# Checkout
- name: Checkout site repository
uses: actions/checkout@v3
with:
path: site
- name: Checkout creative writing repository
uses: actions/checkout@v3
with:
repository: RiskoZoSlovenska/creative-writing
path: creative-writing
submodules: recursive
token: ${{ secrets.GIT_CREDENTIALS }}
# Install dependencies
- name: Install Lua
uses: leafo/gh-actions-lua@v10
- name: Install Luarocks
uses: leafo/gh-actions-luarocks@v4
- name: Install Lua dependencies
run: |
luarocks install penlight
luarocks install dkjson
luarocks install lyaml
luarocks install lcmark
luarocks install cmark
luarocks install gumbo
- name: Install Tailwind CSS CLI # Inspired by https://github.com/ZoeyVid/tailwindcss-update/blob/f929e744f0386697b1a8e06d7e3985732cd9eae5/run.sh
run: |
curl -L https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 \
-o /usr/local/bin/tailwindcss
chmod +x /usr/local/bin/tailwindcss
# Build
- name: Build
run: build-scripts/build.sh ../creative-writing
working-directory: site
# Deploy
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: site/build
- name: Deploy Pages artifact
uses: actions/deploy-pages@v2