Generate and Deploy Website #3
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: Generate and Deploy Website | |
on: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'duckdb/duckdb-web' | |
ref: 'community-extension' | |
path: 'web' | |
- name: Set up DuckDB | |
run: | | |
wget https://github.com/duckdb/duckdb/releases/download/v1.0.0/duckdb_cli-linux-amd64.zip | |
unzip duckdb_cli-linux-amd64.zip | |
chmod +x duckdb | |
- name: Fetch extensions | |
run: | | |
./scripts/fetch_extensions.sh ./duckdb | |
- name: Generate docs | |
run: | | |
./scripts/generate_md.sh ./duckdb | |
cp build/docs/* web/extensions/. | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' # Not needed with a .ruby-version file | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
cache-version: 0 # Increment this number if you need to re-download cached gems | |
- name: Build with Jekyll | |
working-directory: 'web' | |
run: bundle install && bundler exec jekyll build --config _config.yml,_config_exclude_archive.yml | |
- name: Deploy website | |
working-directory: 'web/_site' | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.DUCKDB_COMMUNITY_EXTENSION_S3_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.DUCKDB_COMMUNITY_EXTENSION_S3_SECRET }} | |
AWS_DEFAULT_REGION: ${{ secrets.S3_DUCKDB_ORG_REGION }} | |
run: | | |
aws s3 cp --recursive extensions/ s3://duckdb-community-extensions/extensions --acl public-read | |
aws s3 cp index.html s3://duckdb-community-extensions/ --acl public-read | |
aws s3 cp core_extensions.html s3://duckdb-community-extensions/ --acl public-read | |
aws s3 cp development.html s3://duckdb-community-extensions/ --acl public-read | |
aws s3 cp documentation.html s3://duckdb-community-extensions/ --acl public-read | |
aws s3 cp faq.html s3://duckdb-community-extensions/ --acl public-read |