GitHub Actions
Topics covered:
What is CI/CD?
What is GitHub Action?
Creating GitHub Workflows
Demonstration using Python
Create repository
Create
src/app.py
print("Hello there!")Add
.github/workflows/deploy.yml
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Run Code
run: python src/app.pyExtending Python Example
Update
src/app.py
Add
requirements.txt
Add
.github/workflows/lint.yml
Demonstration using ReactJS
Repository to clone: react-example
Using react-gh-pages
Run:
npm install gh-pages --save-devWorkflow file
package.json
Last updated