Skip to content

problem(A1062): Create #42

problem(A1062): Create

problem(A1062): Create #42

Workflow file for this run

name: Problem Continuous Deployment
on:
push:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
outputs:
should_deploy: ${{ steps.check.outputs.should_deploy }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check contain create problem task
id: check
run: |
if [[ $(git log -1 --pretty=%B) =~ "create:" ]]; then
echo "::set-output name=should_deploy::true"
else
echo "::set-output name=should_deploy::false"
fi
create:
needs: check
runs-on: ubuntu-latest
if: ${{ needs.check.outputs.should_deploy == 'true' }}
environment: oj
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Deployment
run: python manager.py cd
env:
TOKEN: ${{ secrets.TOKEN }}