Artemis Wrapped: adding wrapped queries (#688) #649
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: docs | |
on: | |
push: | |
branches: main | |
env: | |
SYSTEM_SNOWFLAKE_USER: ${{ secrets.SYSTEM_SNOWFLAKE_USER }} | |
SYSTEM_SNOWFLAKE_PASSWORD: ${{ secrets.SYSTEM_SNOWFLAKE_PASSWORD }} | |
SYSTEM_SNOWFLAKE_ROLE: ${{ secrets.SYSTEM_SNOWFLAKE_ROLE }} | |
jobs: | |
write-dbt-to-pages-repo: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Generate a Github App token | |
id: generate_token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.ARTEMIS_CI_APP_ID }} | |
private-key: ${{ secrets.ARTEMIS_CI_APP_PRIVATE_KEY }} | |
owner: ${{ github.repository_owner }} | |
repositories: "artemis-xyz.github.io" | |
- name: Init dbt | |
uses: ./.github/actions/init-dbt | |
- name: Generate docs | |
run: | | |
dbt deps | |
dbt docs generate --threads 16 | |
git diff | |
mkdir generated_dbt_docs | |
mv "target/index.html" "target/manifest.json" "target/catalog.json" "target/partial_parse.msgpack" generated_dbt_docs | |
- name: Push to Github Pages repo | |
uses: cpina/[email protected] | |
env: | |
API_TOKEN_GITHUB: ${{ steps.generate_token.outputs.token }} | |
with: | |
source-directory: 'generated_dbt_docs' | |
target-directory: 'dbt' | |
destination-github-username: 'artemis-xyz' | |
destination-repository-name: 'artemis-xyz.github.io' | |
user-name: 'Artemis CI' | |
commit-message: 'update DBT docs' |