forked from ericafnunes/ericafnunes
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 1.75 KB
/
main.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
60
61
62
63
64
65
66
67
name: Generate and Update Profile Data
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
push:
branches:
- main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Update Profile and Contribution Data
runs-on: ubuntu-latest
steps:
# Checkout Repository
- name: Checkout Repository
uses: actions/checkout@v2
# Setup Python
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
# Install Dependencies
- name: Install Dependencies
run: pip install -r requirements.txt # Assuming you have a requirements.txt file
# Generate GitHub Contribution Snake Animation
- uses: Platane/[email protected]
id: snake-gif
with:
github_user_name: ericafnunes
svg_out_path: dist/github-contribution-grid-snake.svg
# Update README.md with the latest stats
- name: Update README with Latest Stats
run: python update_readme.py
# Run Linters (Example)
- name: Run Linters
run: flake8 # Assuming you're using flake8 as a linter
# Run Automated Tests (Example)
- name: Run Tests
run: pytest # Assuming you're using pytest for testing
# Commit and Push Changes
- name: Commit and Push Changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Update README and Contribution Snake"
git push
# Publish to GitHub Pages and Push README changes
- uses: crazy-max/[email protected]
with:
target_branch: output
build_dir: dist