-
-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (55 loc) · 1.69 KB
/
publish-to-github-pages.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
name: publish-to-github-pages
on:
push:
branches:
- master
permissions:
contents: read
jobs:
build:
if: github.repository == 'FirebirdSQL/jaybird-manual'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@85cde3f5a1033b2adc2442631c24b530f1183a1a
- name: Build with Gradle
run: ./gradlew makePages
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
rm -fr ~/.gradle/caches/*/plugin-resolution/
find ~/.gradle/caches/ -name "*.lock" -type f -delete
- name: Pages artifact
uses: actions/upload-artifact@v4
with:
name: pages-artifact
path: build/pages
compression-level: 9
retention-days: 1
publish-pages:
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Get pages artifact
uses: actions/download-artifact@v4
with:
name: pages-artifact
path: pages
- name: Deploy to GitHub pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: pages