-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (57 loc) · 1.72 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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