This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 98
106 lines (89 loc) · 3.2 KB
/
deploy.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: github pages
on: [push]
jobs:
deploy-landing-page:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set output
id: vars
run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/}
- name: Set baseURL in landing-page/config.toml
run: |
sed -i -e 's|baseURL = ""|baseURL = "https://iceberg\.apache\.org/"|g' landing-page/config.toml
cat landing-page/config.toml
- name: Set params.docsBaseURL in landing-page/config.toml
run: |
sed -i -e 's|docsBaseURL = ""|docsBaseURL = "https://iceberg\.apache\.org/docs/${{ steps.vars.outputs.branch_name }}"|g' landing-page/config.toml
cat landing-page/config.toml
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
run: cd landing-page && hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./landing-page/public
publish_branch: asf-site
destination_dir: ./
keep_files: true
- name: Deploy redirects
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./redirects
publish_branch: asf-site
destination_dir: ./
keep_files: true
deploy-docs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-20.04
continue-on-error: true
steps:
- uses: actions/checkout@v2
- name: Set output
id: vars
run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/}
- name: Set baseURL in docs/config.toml
run: |
sed -i -e 's|baseURL = ""|baseURL = "https://iceberg\.apache\.org/docs/${{ steps.vars.outputs.branch_name }}/"|g' docs/config.toml
cat docs/config.toml
- name: Set params.versions.iceberg in docs/config.toml
run: |
sed -i -e 's|versions\.iceberg = ""|versions\.iceberg = "${{ steps.vars.outputs.branch_name }}"|g' docs/config.toml
cat docs/config.toml
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
run: cd docs && hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/public
publish_branch: asf-site
destination_dir: ./docs/${{ steps.vars.outputs.branch_name }}
deploy-javadoc:
needs: deploy-docs
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set output
id: vars
run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./javadoc
publish_branch: asf-site
destination_dir: ./javadoc/${{ steps.vars.outputs.branch_name }}