Skip to content

Deploy Components

Deploy Components #3

Workflow file for this run

name: Deploy Components
on:
push:
paths:
- "**.scss"
- "*.js"
- "*.html"
- "*.shtm"
workflow_dispatch:
inputs:
recompile:
description: 'Source file to recompile'
required: true
type: string
jobs:
compile:
uses: ./.github/workflows/compile.yml
with:
recompile: ${{ inputs.recompile }}
secrets: inherit
deploy:
runs-on: ubuntu-latest
needs: compile
container:
image: mcr.microsoft.com/playwright/python:v${{ vars.PLAYWRIGHT_VERSION }}
options: --user 1001
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Python ${{ vars.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ vars.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install playwright==${{ vars.PLAYWRIGHT_VERSION }} pytest-playwright
- uses: actions/download-artifact@v3
with:
name: compile-${{ github.sha }}
path: artifacts
- name: Deploy with pytest-playwright
id: deploy
env:
USERNAME: ${{ secrets.ADMIN_USERNAME }}
PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
GROUPS: ${{ secrets.LIBGUIDES_GROUPS }}
run: pytest --slowmo 100 --video on --base-url ${{ secrets.ADMIN_BASE_URL }} -sv .github/workflows/deploy.py
continue-on-error: true
- name: Upload video
uses: actions/upload-artifact@v3
with:
name: deploy-${{ github.sha }}
path: test-results/github-workflows-deploy-py-test-deploy-chromium
- if: steps.deploy.outcome != 'success'
run: exit 1