update : promoted new spreadsheet workflow. #9
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: close-preview | |
on: | |
pull_request: | |
types: [closed] | |
branches: [ "main", "master"] | |
env: | |
TARGET_SCHEMA: dev | |
jobs: | |
preview: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-env | |
with: | |
PROD_ENV: ${{ secrets.PROD_ENV }} | |
- name: Cache Python packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.local | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11.x" | |
- name: Install Python dependencies | |
run: | | |
pip install -r requirements.txt | |
dbt deps | |
- name: Cache npm packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.npm | |
~/.cache/npm | |
node_modules | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- uses: actions/[email protected] | |
with: | |
node-version: '20' | |
- name: Get lightdash version | |
uses: sergeysova/jq-action@v2 | |
id: version | |
env: | |
LIGHTDASH_URL: ${{ secrets.LIGHTDASH_URL }} | |
with: | |
cmd: curl -s "${LIGHTDASH_URL}/api/v1/health" | jq -r '.results.version' | |
- name: Install npm dependencies | |
run: npm install -g "@lightdash/cli@${{ steps.version.outputs.value }}" || npm install -g @lightdash/cli@latest | |
- name: Lightdash CLI stop preview | |
env: | |
LIGHTDASH_API_KEY: ${{ secrets.LIGHTDASH_API_KEY }} | |
LIGHTDASH_PROJECT: ${{ secrets.LIGHTDASH_PROJECT }} | |
LIGHTDASH_URL: ${{ secrets.LIGHTDASH_URL }} | |
run: lightdash stop-preview --name ${GITHUB_HEAD_REF##*/} |