This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
Update Slack URL #335
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |