-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.32 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
name: git push into another repo to deploy to vercel
on:
push:
branches:
- "dev"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "18"
- name: creates .env file
run: |
echo "${{ secrets.APPLICATION_ENV }}" | base64 --decode > .env
- name: Create output
run: sh ./build.sh
- name: Extract branch name
id: extract_branch
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Push to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }}
with:
source-directory: "output"
destination-github-username: "urimeee"
destination-repository-name: "sohawgi_Front"
user-email: ${{ secrets.EMAIL }}
commit-message: |
${{ github.event.commits[0].message }} / ${{ github.run_id }}
target-branch: ${{ steps.extract_branch.outputs.branch }}
create-target-branch-if-needed: true
- name: Test get variable exported by push-to-another-repository
run: echo $DESTINATION_CLONED_DIRECTORY