-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (61 loc) · 1.79 KB
/
continuous-deployment.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
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
76
77
name: Continuous deployment
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: 1.11.1.1347
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
key: cljdeps-${{ hashFiles('deps.edn') }}
#key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
#key: cljdeps-${{ hashFiles('project.clj') }}
#key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-
- run: clojure -M:build /uPortal-website
- uses: actions/upload-artifact@v3
with:
path: |
dist
deploy:
if: github.ref_name == 'main'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/download-artifact@v3
- name: Fix permissions
run: |
chmod -v -R +rX "artifact/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: artifact/
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2