You can have multiple files in the .github/workflows
folder. All files will be read and run as independent tests. The 'on' parameter on each file will tell when it must be called.
Following your idea you could have:
dev.workflow.yml
- To run some kind of testing maybe (only on dev branch, when push)
name: Dev Workflow - Test and check thing
on:
push:
branches:
- dev
jobs:
...
prod.workflow.yml
- To build and deploy your project (only on master branch, when a PR is closed)
name: Master Workflow - Build and deploy to production
on:
pull_request:
types: closed
branches:
- master
jobs:
...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…