4
4
workflow_run :
5
5
workflows : [ Build ]
6
6
types : [ completed ]
7
+ branches :
8
+ - ' master'
9
+ - ' ver/**'
7
10
push :
8
11
branches :
9
12
- ' build/**'
@@ -18,43 +21,44 @@ jobs:
18
21
uses : actions/checkout@v2
19
22
20
23
- name : Merge Build Branches
21
- run : |
22
- CNAME='docs.commandapi.dev'
23
-
24
- git config --global user.name 'github-actions[bot]'
25
- git config --global user.email 'github-actions[bot]@users.noreply.github.com'
26
-
27
- TARGET_BRANCH="deploy"
28
- BASE_BRANCH="origin/build/master"
29
- ORIGIN_URL=$(git remote get-url origin)
30
- SUFFIX=".git"
31
- TARGET_URL=${ORIGIN_URL%$SUFFIX}
32
-
33
- git fetch origin
34
- git checkout -b ${TARGET_BRANCH} ${BASE_BRANCH}
35
-
36
- BRANCHES=$(git branch -r | grep 'origin/build/ver/')
37
-
38
- for BRANCH in $BRANCHES; do
39
- BRANCH_NAME=$(echo $BRANCH | sed 's|origin/||')
40
- LOCAL_DIR=$(echo $BRANCH_NAME | sed 's|build/ver/||')
41
- TARGET_ZIP="${TARGET_URL}/archive/refs/heads/${BRANCH_NAME}.zip"
42
-
43
- echo "Branch: ${BRANCH_NAME}"
44
- echo "URL: ${TARGET_ZIP}"
45
- echo "Local: ${LOCAL_DIR}"
46
-
47
- mkdir -p ${LOCAL_DIR}
48
- wget --max-redirect=10 -O ${LOCAL_DIR}/dist.zip ${TARGET_ZIP}
49
- TEMP_DIR=$(mktemp -d)
50
- unzip ${LOCAL_DIR}/dist.zip -d ${TEMP_DIR}
51
- mv ${TEMP_DIR}/*/* ${LOCAL_DIR}
52
- rm ${LOCAL_DIR}/dist.zip
53
- done
54
-
55
- echo ${CNAME} > CNAME
56
-
57
- git add .
58
- git commit -m "GitHub Actions Auto Deploy"
59
-
60
- git push -f origin "${TARGET_BRANCH}"
24
+ run : echo Sadly, this also ran!
25
+ # run: |
26
+ # CNAME='docs.commandapi.dev'
27
+ #
28
+ # git config --global user.name 'github-actions[bot]'
29
+ # git config --global user.email 'github-actions[bot]@users.noreply.github.com'
30
+ #
31
+ # TARGET_BRANCH="deploy"
32
+ # BASE_BRANCH="origin/build/master"
33
+ # ORIGIN_URL=$(git remote get-url origin)
34
+ # SUFFIX=".git"
35
+ # TARGET_URL=${ORIGIN_URL%$SUFFIX}
36
+ #
37
+ # git fetch origin
38
+ # git checkout -b ${TARGET_BRANCH} ${BASE_BRANCH}
39
+ #
40
+ # BRANCHES=$(git branch -r | grep 'origin/build/ver/')
41
+ #
42
+ # for BRANCH in $BRANCHES; do
43
+ # BRANCH_NAME=$(echo $BRANCH | sed 's|origin/||')
44
+ # LOCAL_DIR=$(echo $BRANCH_NAME | sed 's|build/ver/||')
45
+ # TARGET_ZIP="${TARGET_URL}/archive/refs/heads/${BRANCH_NAME}.zip"
46
+ #
47
+ # echo "Branch: ${BRANCH_NAME}"
48
+ # echo "URL: ${TARGET_ZIP}"
49
+ # echo "Local: ${LOCAL_DIR}"
50
+ #
51
+ # mkdir -p ${LOCAL_DIR}
52
+ # wget --max-redirect=10 -O ${LOCAL_DIR}/dist.zip ${TARGET_ZIP}
53
+ # TEMP_DIR=$(mktemp -d)
54
+ # unzip ${LOCAL_DIR}/dist.zip -d ${TEMP_DIR}
55
+ # mv ${TEMP_DIR}/*/* ${LOCAL_DIR}
56
+ # rm ${LOCAL_DIR}/dist.zip
57
+ # done
58
+ #
59
+ # echo ${CNAME} > CNAME
60
+ #
61
+ # git add .
62
+ # git commit -m "GitHub Actions Auto Deploy"
63
+ #
64
+ # git push -f origin "${TARGET_BRANCH}"
0 commit comments