-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.34 KB
/
deploy.yml
File metadata and controls
46 lines (40 loc) · 1.34 KB
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
name: Build & Deploy to https://github.com/Kuuuuu00/MainFE
on:
push:
branches:
- dev
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
container: pandoc/latex
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Prepare output
shell: sh
run: |
# enable extglob and dotglob might not work in sh
# Use alternative commands for file copying
rm -rf output
mkdir output
# Use find command instead of extglob pattern
find . -maxdepth 1 -not -path "./output" -not -path "./.git" -not -path "./.github" -exec cp -R {} output/ \;
- name: Push to https://github.com/Kuuuuu00/MainFE
id: push
uses: cpina/github-action-push-to-another-repository@v1.7.2
env:
API_TOKEN_GITHUB: ${{ secrets.NP_PAT }}
with:
source-directory: 'output'
destination-github-username: Kuuuuu00
destination-repository-name: MainFE
user-name: GitHub Actions
user-email: pky456963@naver.com
commit-message: 'Deploy from build: ${{ github.sha }}'
target-branch: dev
- name: 'Debug: show cloned dir'
run: echo "Cloned into $DESTINATION_CLONED_DIRECTORY"