-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.3 KB
/
deploy_brach.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
name: Copy files to deploy branch
on:
push:
branches:
- main # Rama principal
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: main
- name: List files in the repository
run: ls -la
- name: Copy files
run: |
mkdir -p deployment_directory/
cp -r Pynani deployment_directory/
cp pyproject.toml deployment_directory/
cp README.md deployment_directory/
cp LICENSE deployment_directory/
cp .gitignore deployment_directory/
- name: Checkout deployment branch
run: |
git checkout deployment-branch
- name: Configure Git
run: |
git config --global user.name "jorge-jrzz"
git config --global user.email "[email protected]"
- name: Copy to Deploy Branch
run: |
cp -r deployment_directory/* .
rm -rf deployment_directory
git add .
- name: Commit and push changes
env:
ACTIONS_DEPLOY_TOKEN: ${{ secrets.ACTIONS_DEPLOY_TOKEN }}
run: |
git commit -m "🚀 Deploy files" || echo "No changes to commit"
git push https://jorge-jrzz:${{ secrets.ACTIONS_DEPLOY_TOKEN }}@github.com/jorge-jrzz/Pynani.git deployment-branch