56 lines
2.0 KiB
YAML
56 lines
2.0 KiB
YAML
name: prod
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'cesium.com'
|
|
- 'cesium.com-staging'
|
|
jobs:
|
|
deploy-docs:
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.NATIVE_ACCESS_KEY }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.NATIVE_SECRET_KEY }}
|
|
AWS_REGION: us-east-1
|
|
steps:
|
|
- name: Install Doxygen
|
|
run: |
|
|
cd ~
|
|
wget https://github.com/doxygen/doxygen/releases/download/Release_1_13_2/doxygen-1.13.2.linux.bin.tar.gz
|
|
tar xzf doxygen-1.13.2.linux.bin.tar.gz
|
|
export PATH=$PWD/doxygen-1.13.2/bin:$PATH
|
|
echo "PATH=$PATH" >> "$GITHUB_ENV"
|
|
doxygen --version
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
- name: ccache
|
|
uses: hendrikmuhs/ccache-action@v1.2.9
|
|
with:
|
|
key: ccache-ubuntu-24.04-doxygen
|
|
- name: Cache vcpkg artifacts
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.ezvcpkg
|
|
key: vcpkg-ubuntu-24.04-doxygen-${{ hashFiles('CMakeLists.txt') }}
|
|
restore-keys: |
|
|
vcpkg-ubuntu-24.04-doxygen-${{ hashFiles('CMakeLists.txt') }}
|
|
vcpkg-ubuntu-24.04-doxygen
|
|
- name: Mark documentation official
|
|
if: ${{ github.ref_name == 'cesium.com' }}
|
|
run: |
|
|
echo "EXTRA_CONFIGURE_ARGS=-DCESIUM_PRODUCTION_DOCS=TRUE" >> "$GITHUB_ENV"
|
|
- name: Generate Documentation
|
|
run: |
|
|
npm install
|
|
cmake -B build -S . $EXTRA_CONFIGURE_ARGS
|
|
cmake --build build --target cesium-native-docs
|
|
- name: Deploy to cesium.com
|
|
if: ${{ github.ref_name == 'cesium.com' }}
|
|
run: |
|
|
aws s3 sync build/doc/html/ s3://cesium-website/cesium-native/ref-doc/ --cache-control "public, max-age=1800" --delete
|
|
- name: Deploy to cesium.com staging
|
|
if: ${{ github.ref_name == 'cesium.com-staging' }}
|
|
run: |
|
|
aws s3 sync build/doc/html/ s3://cesium-website/cesium-native/ref-doc-staging/ --cache-control "public, max-age=1800" --delete
|